// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Drive API Version v2
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://developers.google.com/drive/'>Drive API</a>
 *      <tr><th>API Version<td>v2
 *      <tr><th>API Rev<td>20170314 (803)
 *      <tr><th>API Docs
 *          <td><a href='https://developers.google.com/drive/'>
 *              https://developers.google.com/drive/</a>
 *      <tr><th>Discovery Name<td>drive
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Drive API can be found at
 * <a href='https://developers.google.com/drive/'>https://developers.google.com/drive/</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.Drive.v2
{
    /// <summary>The Drive Service.</summary>
    public class DriveService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v2";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public DriveService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public DriveService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            about = new AboutResource(this);
            apps = new AppsResource(this);
            changes = new ChangesResource(this);
            channels = new ChannelsResource(this);
            children = new ChildrenResource(this);
            comments = new CommentsResource(this);
            files = new FilesResource(this);
            parents = new ParentsResource(this);
            permissions = new PermissionsResource(this);
            properties = new PropertiesResource(this);
            realtime = new RealtimeResource(this);
            replies = new RepliesResource(this);
            revisions = new RevisionsResource(this);
            teamdrives = new TeamdrivesResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "drive"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/drive/v2/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "drive/v2/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Drive API.</summary>
        public class Scope
        {
            /// <summary>View and manage the files in your Google Drive</summary>
            public static string Drive = "https://www.googleapis.com/auth/drive";

            /// <summary>View and manage its own configuration data in your Google Drive</summary>
            public static string DriveAppdata = "https://www.googleapis.com/auth/drive.appdata";

            /// <summary>View your Google Drive apps</summary>
            public static string DriveAppsReadonly = "https://www.googleapis.com/auth/drive.apps.readonly";

            /// <summary>View and manage Google Drive files and folders that you have opened or created with this
            /// app</summary>
            public static string DriveFile = "https://www.googleapis.com/auth/drive.file";

            /// <summary>View and manage metadata of files in your Google Drive</summary>
            public static string DriveMetadata = "https://www.googleapis.com/auth/drive.metadata";

            /// <summary>View metadata for files in your Google Drive</summary>
            public static string DriveMetadataReadonly = "https://www.googleapis.com/auth/drive.metadata.readonly";

            /// <summary>View the photos, videos and albums in your Google Photos</summary>
            public static string DrivePhotosReadonly = "https://www.googleapis.com/auth/drive.photos.readonly";

            /// <summary>View the files in your Google Drive</summary>
            public static string DriveReadonly = "https://www.googleapis.com/auth/drive.readonly";

            /// <summary>Modify your Google Apps Script scripts' behavior</summary>
            public static string DriveScripts = "https://www.googleapis.com/auth/drive.scripts";

        }



        private readonly AboutResource about;

        /// <summary>Gets the About resource.</summary>
        public virtual AboutResource About
        {
            get { return about; }
        }

        private readonly AppsResource apps;

        /// <summary>Gets the Apps resource.</summary>
        public virtual AppsResource Apps
        {
            get { return apps; }
        }

        private readonly ChangesResource changes;

        /// <summary>Gets the Changes resource.</summary>
        public virtual ChangesResource Changes
        {
            get { return changes; }
        }

        private readonly ChannelsResource channels;

        /// <summary>Gets the Channels resource.</summary>
        public virtual ChannelsResource Channels
        {
            get { return channels; }
        }

        private readonly ChildrenResource children;

        /// <summary>Gets the Children resource.</summary>
        public virtual ChildrenResource Children
        {
            get { return children; }
        }

        private readonly CommentsResource comments;

        /// <summary>Gets the Comments resource.</summary>
        public virtual CommentsResource Comments
        {
            get { return comments; }
        }

        private readonly FilesResource files;

        /// <summary>Gets the Files resource.</summary>
        public virtual FilesResource Files
        {
            get { return files; }
        }

        private readonly ParentsResource parents;

        /// <summary>Gets the Parents resource.</summary>
        public virtual ParentsResource Parents
        {
            get { return parents; }
        }

        private readonly PermissionsResource permissions;

        /// <summary>Gets the Permissions resource.</summary>
        public virtual PermissionsResource Permissions
        {
            get { return permissions; }
        }

        private readonly PropertiesResource properties;

        /// <summary>Gets the Properties resource.</summary>
        public virtual PropertiesResource Properties
        {
            get { return properties; }
        }

        private readonly RealtimeResource realtime;

        /// <summary>Gets the Realtime resource.</summary>
        public virtual RealtimeResource Realtime
        {
            get { return realtime; }
        }

        private readonly RepliesResource replies;

        /// <summary>Gets the Replies resource.</summary>
        public virtual RepliesResource Replies
        {
            get { return replies; }
        }

        private readonly RevisionsResource revisions;

        /// <summary>Gets the Revisions resource.</summary>
        public virtual RevisionsResource Revisions
        {
            get { return revisions; }
        }

        private readonly TeamdrivesResource teamdrives;

        /// <summary>Gets the Teamdrives resource.</summary>
        public virtual TeamdrivesResource Teamdrives
        {
            get { return teamdrives; }
        }
    }

    ///<summary>A base abstract class for Drive requests.</summary>
    public abstract class DriveBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new DriveBaseServiceRequest instance.</summary>
        protected DriveBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes Drive parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "about" collection of methods.</summary>
    public class AboutResource
    {
        private const string Resource = "about";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public AboutResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Gets the information about the current user along with Drive API settings</summary>
        public virtual GetRequest Get()
        {
            return new GetRequest(service);
        }

        /// <summary>Gets the information about the current user along with Drive API settings</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.About>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>When calculating the number of remaining change IDs, whether to include public files the user
            /// has opened and shared files. When set to false, this counts only change IDs for owned files and any
            /// shared or public files that the user has explicitly added to a folder they own.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("includeSubscribed", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeSubscribed { get; set; }

            /// <summary>Maximum number of remaining change IDs to count</summary>
            /// [default: 1]
            [Google.Apis.Util.RequestParameterAttribute("maxChangeIdCount", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxChangeIdCount { get; set; }

            /// <summary>Change ID to start counting from when calculating number of remaining change IDs</summary>
            [Google.Apis.Util.RequestParameterAttribute("startChangeId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> StartChangeId { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "about"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "includeSubscribed", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeSubscribed",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "true",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxChangeIdCount", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxChangeIdCount",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "1",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "startChangeId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startChangeId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "apps" collection of methods.</summary>
    public class AppsResource
    {
        private const string Resource = "apps";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public AppsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Gets a specific app.</summary>
        /// <param name="appId">The ID of the app.</param>
        public virtual GetRequest Get(string appId)
        {
            return new GetRequest(service, appId);
        }

        /// <summary>Gets a specific app.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.App>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string appId)
                : base(service)
            {
                AppId = appId;
                InitParameters();
            }


            /// <summary>The ID of the app.</summary>
            [Google.Apis.Util.RequestParameterAttribute("appId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AppId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "apps/{appId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "appId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "appId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists a user's installed apps.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>Lists a user's installed apps.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.AppList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>A comma-separated list of file extensions for open with filtering. All apps within the given
            /// app query scope which can open any of the given file extensions will be included in the response. If
            /// appFilterMimeTypes are provided as well, the result is a union of the two resulting app lists.</summary>
            [Google.Apis.Util.RequestParameterAttribute("appFilterExtensions", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string AppFilterExtensions { get; set; }

            /// <summary>A comma-separated list of MIME types for open with filtering. All apps within the given app
            /// query scope which can open any of the given MIME types will be included in the response. If
            /// appFilterExtensions are provided as well, the result is a union of the two resulting app
            /// lists.</summary>
            [Google.Apis.Util.RequestParameterAttribute("appFilterMimeTypes", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string AppFilterMimeTypes { get; set; }

            /// <summary>A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML
            /// format (http://www.unicode.org/reports/tr35/).</summary>
            [Google.Apis.Util.RequestParameterAttribute("languageCode", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string LanguageCode { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "apps"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "appFilterExtensions", new Google.Apis.Discovery.Parameter
                    {
                        Name = "appFilterExtensions",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "appFilterMimeTypes", new Google.Apis.Discovery.Parameter
                    {
                        Name = "appFilterMimeTypes",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "languageCode", new Google.Apis.Discovery.Parameter
                    {
                        Name = "languageCode",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "changes" collection of methods.</summary>
    public class ChangesResource
    {
        private const string Resource = "changes";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ChangesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Gets a specific change.</summary>
        /// <param name="changeId">The ID of the change.</param>
        public virtual GetRequest Get(string changeId)
        {
            return new GetRequest(service, changeId);
        }

        /// <summary>Gets a specific change.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Change>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string changeId)
                : base(service)
            {
                ChangeId = changeId;
                InitParameters();
            }


            /// <summary>The ID of the change.</summary>
            [Google.Apis.Util.RequestParameterAttribute("changeId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ChangeId { get; private set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>The Team Drive from which the change will be returned.</summary>
            [Google.Apis.Util.RequestParameterAttribute("teamDriveId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TeamDriveId { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "changes/{changeId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "changeId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "changeId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "teamDriveId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "teamDriveId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets the starting pageToken for listing future changes.</summary>
        public virtual GetStartPageTokenRequest GetStartPageToken()
        {
            return new GetStartPageTokenRequest(service);
        }

        /// <summary>Gets the starting pageToken for listing future changes.</summary>
        public class GetStartPageTokenRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.StartPageToken>
        {
            /// <summary>Constructs a new GetStartPageToken request.</summary>
            public GetStartPageTokenRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>The ID of the Team Drive for which the starting pageToken for listing future changes from that
            /// Team Drive will be returned.</summary>
            [Google.Apis.Util.RequestParameterAttribute("teamDriveId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TeamDriveId { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "getStartPageToken"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "changes/startPageToken"; }
            }

            /// <summary>Initializes GetStartPageToken parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "teamDriveId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "teamDriveId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists the changes for a user or Team Drive.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>Lists the changes for a user or Team Drive.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.ChangeList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>Whether changes should include the file resource if the file is still accessible by the user at
            /// the time of the request, even when a file was removed from the list of changes and there will be no
            /// further change entries for this file.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("includeCorpusRemovals", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeCorpusRemovals { get; set; }

            /// <summary>Whether to include changes indicating that items have been removed from the list of changes,
            /// for example by deletion or loss of access.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("includeDeleted", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeDeleted { get; set; }

            /// <summary>Whether to include public files the user has opened and shared files. When set to false, the
            /// list only includes owned files plus any shared or public files the user has explicitly added to a folder
            /// they own.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("includeSubscribed", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeSubscribed { get; set; }

            /// <summary>Whether Team Drive files or changes should be included in results.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("includeTeamDriveItems", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeTeamDriveItems { get; set; }

            /// <summary>Maximum number of changes to return.</summary>
            /// [default: 100]
            /// [minimum: 1]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>The token for continuing a previous list request on the next page. This should be set to the
            /// value of 'nextPageToken' from the previous response or to the response from the getStartPageToken
            /// method.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and
            /// 'photos'.</summary>
            [Google.Apis.Util.RequestParameterAttribute("spaces", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Spaces { get; set; }

            /// <summary>Change ID to start listing changes from.</summary>
            [Google.Apis.Util.RequestParameterAttribute("startChangeId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> StartChangeId { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>The Team Drive from which changes will be returned. If specified the change IDs will be
            /// reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.</summary>
            [Google.Apis.Util.RequestParameterAttribute("teamDriveId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TeamDriveId { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "changes"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "includeCorpusRemovals", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeCorpusRemovals",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeDeleted", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeDeleted",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "true",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeSubscribed", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeSubscribed",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "true",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeTeamDriveItems", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeTeamDriveItems",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "100",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "spaces", new Google.Apis.Discovery.Parameter
                    {
                        Name = "spaces",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "startChangeId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startChangeId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "teamDriveId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "teamDriveId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Subscribe to changes for a user.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual WatchRequest Watch(Google.Apis.Drive.v2.Data.Channel body)
        {
            return new WatchRequest(service, body);
        }

        /// <summary>Subscribe to changes for a user.</summary>
        public class WatchRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Channel>
        {
            /// <summary>Constructs a new Watch request.</summary>
            public WatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Channel body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }


            /// <summary>Whether changes should include the file resource if the file is still accessible by the user at
            /// the time of the request, even when a file was removed from the list of changes and there will be no
            /// further change entries for this file.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("includeCorpusRemovals", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeCorpusRemovals { get; set; }

            /// <summary>Whether to include changes indicating that items have been removed from the list of changes,
            /// for example by deletion or loss of access.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("includeDeleted", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeDeleted { get; set; }

            /// <summary>Whether to include public files the user has opened and shared files. When set to false, the
            /// list only includes owned files plus any shared or public files the user has explicitly added to a folder
            /// they own.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("includeSubscribed", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeSubscribed { get; set; }

            /// <summary>Whether Team Drive files or changes should be included in results.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("includeTeamDriveItems", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeTeamDriveItems { get; set; }

            /// <summary>Maximum number of changes to return.</summary>
            /// [default: 100]
            /// [minimum: 1]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>The token for continuing a previous list request on the next page. This should be set to the
            /// value of 'nextPageToken' from the previous response or to the response from the getStartPageToken
            /// method.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and
            /// 'photos'.</summary>
            [Google.Apis.Util.RequestParameterAttribute("spaces", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Spaces { get; set; }

            /// <summary>Change ID to start listing changes from.</summary>
            [Google.Apis.Util.RequestParameterAttribute("startChangeId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> StartChangeId { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>The Team Drive from which changes will be returned. If specified the change IDs will be
            /// reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.</summary>
            [Google.Apis.Util.RequestParameterAttribute("teamDriveId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TeamDriveId { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Channel Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "watch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "changes/watch"; }
            }

            /// <summary>Initializes Watch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "includeCorpusRemovals", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeCorpusRemovals",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeDeleted", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeDeleted",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "true",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeSubscribed", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeSubscribed",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "true",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeTeamDriveItems", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeTeamDriveItems",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "100",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "spaces", new Google.Apis.Discovery.Parameter
                    {
                        Name = "spaces",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "startChangeId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startChangeId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "teamDriveId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "teamDriveId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "channels" collection of methods.</summary>
    public class ChannelsResource
    {
        private const string Resource = "channels";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ChannelsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Stop watching resources through this channel</summary>
        /// <param name="body">The body of the request.</param>
        public virtual StopRequest Stop(Google.Apis.Drive.v2.Data.Channel body)
        {
            return new StopRequest(service, body);
        }

        /// <summary>Stop watching resources through this channel</summary>
        public class StopRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Stop request.</summary>
            public StopRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Channel body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Channel Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "stop"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "channels/stop"; }
            }

            /// <summary>Initializes Stop parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }
    }

    /// <summary>The "children" collection of methods.</summary>
    public class ChildrenResource
    {
        private const string Resource = "children";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ChildrenResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Removes a child from a folder.</summary>
        /// <param name="folderId">The ID of the folder.</param>
        /// <param name="childId">The ID of the child.</param>
        public virtual DeleteRequest Delete(string folderId, string childId)
        {
            return new DeleteRequest(service, folderId, childId);
        }

        /// <summary>Removes a child from a folder.</summary>
        public class DeleteRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string folderId, string childId)
                : base(service)
            {
                FolderId = folderId;
                ChildId = childId;
                InitParameters();
            }


            /// <summary>The ID of the folder.</summary>
            [Google.Apis.Util.RequestParameterAttribute("folderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FolderId { get; private set; }

            /// <summary>The ID of the child.</summary>
            [Google.Apis.Util.RequestParameterAttribute("childId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ChildId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{folderId}/children/{childId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "folderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "folderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "childId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "childId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets a specific child reference.</summary>
        /// <param name="folderId">The ID of the folder.</param>
        /// <param name="childId">The ID of the child.</param>
        public virtual GetRequest Get(string folderId, string childId)
        {
            return new GetRequest(service, folderId, childId);
        }

        /// <summary>Gets a specific child reference.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.ChildReference>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string folderId, string childId)
                : base(service)
            {
                FolderId = folderId;
                ChildId = childId;
                InitParameters();
            }


            /// <summary>The ID of the folder.</summary>
            [Google.Apis.Util.RequestParameterAttribute("folderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FolderId { get; private set; }

            /// <summary>The ID of the child.</summary>
            [Google.Apis.Util.RequestParameterAttribute("childId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ChildId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{folderId}/children/{childId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "folderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "folderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "childId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "childId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Inserts a file into a folder.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="folderId">The ID of the folder.</param>
        public virtual InsertRequest Insert(Google.Apis.Drive.v2.Data.ChildReference body, string folderId)
        {
            return new InsertRequest(service, body, folderId);
        }

        /// <summary>Inserts a file into a folder.</summary>
        public class InsertRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.ChildReference>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.ChildReference body, string folderId)
                : base(service)
            {
                FolderId = folderId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the folder.</summary>
            [Google.Apis.Util.RequestParameterAttribute("folderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FolderId { get; private set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.ChildReference Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{folderId}/children"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "folderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "folderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists a folder's children.</summary>
        /// <param name="folderId">The ID of the folder.</param>
        public virtual ListRequest List(string folderId)
        {
            return new ListRequest(service, folderId);
        }

        /// <summary>Lists a folder's children.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.ChildList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string folderId)
                : base(service)
            {
                FolderId = folderId;
                InitParameters();
            }


            /// <summary>The ID of the folder.</summary>
            [Google.Apis.Util.RequestParameterAttribute("folderId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FolderId { get; private set; }

            /// <summary>Maximum number of children to return.</summary>
            /// [default: 100]
            /// [minimum: 0]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder',
            /// 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency',
            /// 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending by default, but may be reversed
            /// with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there
            /// is a current limitation for users with approximately one million files in which the requested sort order
            /// is ignored.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderBy", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OrderBy { get; set; }

            /// <summary>Page token for children.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Query string for searching children.</summary>
            [Google.Apis.Util.RequestParameterAttribute("q", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Q { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{folderId}/children"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "folderId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "folderId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "100",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderBy", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderBy",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "q", new Google.Apis.Discovery.Parameter
                    {
                        Name = "q",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "comments" collection of methods.</summary>
    public class CommentsResource
    {
        private const string Resource = "comments";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public CommentsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a comment.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="commentId">The ID of the comment.</param>
        public virtual DeleteRequest Delete(string fileId, string commentId)
        {
            return new DeleteRequest(service, fileId, commentId);
        }

        /// <summary>Deletes a comment.</summary>
        public class DeleteRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string fileId, string commentId)
                : base(service)
            {
                FileId = fileId;
                CommentId = commentId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the comment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("commentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CommentId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments/{commentId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "commentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "commentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets a comment by ID.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="commentId">The ID of the comment.</param>
        public virtual GetRequest Get(string fileId, string commentId)
        {
            return new GetRequest(service, fileId, commentId);
        }

        /// <summary>Gets a comment by ID.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Comment>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string fileId, string commentId)
                : base(service)
            {
                FileId = fileId;
                CommentId = commentId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the comment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("commentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CommentId { get; private set; }

            /// <summary>If set, this will succeed when retrieving a deleted comment, and will include any deleted
            /// replies.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("includeDeleted", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeDeleted { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments/{commentId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "commentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "commentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeDeleted", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeDeleted",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new comment on the given file.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file.</param>
        public virtual InsertRequest Insert(Google.Apis.Drive.v2.Data.Comment body, string fileId)
        {
            return new InsertRequest(service, body, fileId);
        }

        /// <summary>Creates a new comment on the given file.</summary>
        public class InsertRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Comment>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Comment body, string fileId)
                : base(service)
            {
                FileId = fileId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Comment Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists a file's comments.</summary>
        /// <param name="fileId">The ID of the file.</param>
        public virtual ListRequest List(string fileId)
        {
            return new ListRequest(service, fileId);
        }

        /// <summary>Lists a file's comments.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.CommentList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>If set, all comments and replies, including deleted comments and replies (with content
            /// stripped) will be returned.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("includeDeleted", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeDeleted { get; set; }

            /// <summary>The maximum number of discussions to include in the response, used for paging.</summary>
            /// [default: 20]
            /// [minimum: 0]
            /// [maximum: 100]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>The continuation token, used to page through large result sets. To get the next page of
            /// results, set this parameter to the value of "nextPageToken" from the previous response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Only discussions that were updated after this timestamp will be returned. Formatted as an RFC
            /// 3339 timestamp.</summary>
            [Google.Apis.Util.RequestParameterAttribute("updatedMin", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UpdatedMin { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeDeleted", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeDeleted",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "20",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "updatedMin", new Google.Apis.Discovery.Parameter
                    {
                        Name = "updatedMin",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an existing comment. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="commentId">The ID of the comment.</param>
        public virtual PatchRequest Patch(Google.Apis.Drive.v2.Data.Comment body, string fileId, string commentId)
        {
            return new PatchRequest(service, body, fileId, commentId);
        }

        /// <summary>Updates an existing comment. This method supports patch semantics.</summary>
        public class PatchRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Comment>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Comment body, string fileId, string commentId)
                : base(service)
            {
                FileId = fileId;
                CommentId = commentId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the comment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("commentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CommentId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Comment Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments/{commentId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "commentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "commentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an existing comment.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="commentId">The ID of the comment.</param>
        public virtual UpdateRequest Update(Google.Apis.Drive.v2.Data.Comment body, string fileId, string commentId)
        {
            return new UpdateRequest(service, body, fileId, commentId);
        }

        /// <summary>Updates an existing comment.</summary>
        public class UpdateRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Comment>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Comment body, string fileId, string commentId)
                : base(service)
            {
                FileId = fileId;
                CommentId = commentId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the comment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("commentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CommentId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Comment Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments/{commentId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "commentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "commentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "files" collection of methods.</summary>
    public class FilesResource
    {
        private const string Resource = "files";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public FilesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Creates a copy of the specified file.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file to copy.</param>
        public virtual CopyRequest Copy(Google.Apis.Drive.v2.Data.File body, string fileId)
        {
            return new CopyRequest(service, body, fileId);
        }

        /// <summary>Creates a copy of the specified file.</summary>
        public class CopyRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.File>
        {
            /// <summary>Constructs a new Copy request.</summary>
            public CopyRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.File body, string fileId)
                : base(service)
            {
                FileId = fileId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file to copy.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Whether to convert this file to the corresponding Google Docs format.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("convert", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Convert { get; set; }

            /// <summary>Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("ocr", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Ocr { get; set; }

            /// <summary>If ocr is true, hints at the language to use. Valid values are BCP 47 codes.</summary>
            [Google.Apis.Util.RequestParameterAttribute("ocrLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OcrLanguage { get; set; }

            /// <summary>Whether to pin the head revision of the new copy. A file can have a maximum of 200 pinned
            /// revisions.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("pinned", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Pinned { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>The language of the timed text.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextLanguage { get; set; }

            /// <summary>The timed text track name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextTrackName", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextTrackName { get; set; }

            /// <summary>The visibility of the new file. This parameter is only relevant when the source is not a native
            /// Google Doc and convert=false.</summary>
            /// [default: DEFAULT]
            [Google.Apis.Util.RequestParameterAttribute("visibility", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<VisibilityEnum> Visibility { get; set; }

            /// <summary>The visibility of the new file. This parameter is only relevant when the source is not a native
            /// Google Doc and convert=false.</summary>
            public enum VisibilityEnum
            {
                /// <summary>The visibility of the new file is determined by the user's default visibility/sharing
                /// policies.</summary>
                [Google.Apis.Util.StringValueAttribute("DEFAULT")]
                DEFAULT__,
                /// <summary>The new file will be visible to only the owner.</summary>
                [Google.Apis.Util.StringValueAttribute("PRIVATE")]
                PRIVATE__,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.File Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "copy"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/copy"; }
            }

            /// <summary>Initializes Copy parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "convert", new Google.Apis.Discovery.Parameter
                    {
                        Name = "convert",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "ocr", new Google.Apis.Discovery.Parameter
                    {
                        Name = "ocr",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "ocrLanguage", new Google.Apis.Discovery.Parameter
                    {
                        Name = "ocrLanguage",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pinned", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pinned",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "timedTextLanguage", new Google.Apis.Discovery.Parameter
                    {
                        Name = "timedTextLanguage",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "timedTextTrackName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "timedTextTrackName",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "visibility", new Google.Apis.Discovery.Parameter
                    {
                        Name = "visibility",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "DEFAULT",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the
        /// file or be an organizer on the parent for Team Drive files.</summary>
        /// <param name="fileId">The ID of the file to delete.</param>
        public virtual DeleteRequest Delete(string fileId)
        {
            return new DeleteRequest(service, fileId);
        }

        /// <summary>Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the
        /// file or be an organizer on the parent for Team Drive files.</summary>
        public class DeleteRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                InitParameters();
            }


            /// <summary>The ID of the file to delete.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Permanently deletes all of the user's trashed files.</summary>
        public virtual EmptyTrashRequest EmptyTrash()
        {
            return new EmptyTrashRequest(service);
        }

        /// <summary>Permanently deletes all of the user's trashed files.</summary>
        public class EmptyTrashRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new EmptyTrash request.</summary>
            public EmptyTrashRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }



            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "emptyTrash"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/trash"; }
            }

            /// <summary>Initializes EmptyTrash parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Exports a Google Doc to the requested MIME type and returns the exported content.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="mimeType">The MIME type of the format
        /// requested for this export.</param>
        public virtual ExportRequest Export(string fileId, string mimeType)
        {
            return new ExportRequest(service, fileId, mimeType);
        }

        /// <summary>Exports a Google Doc to the requested MIME type and returns the exported content.</summary>
        public class ExportRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Export request.</summary>
            public ExportRequest(Google.Apis.Services.IClientService service, string fileId, string mimeType)
                : base(service)
            {
                FileId = fileId;
                MimeType = mimeType;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The MIME type of the format requested for this export.</summary>
            [Google.Apis.Util.RequestParameterAttribute("mimeType", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string MimeType { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "export"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/export"; }
            }

            /// <summary>Initializes Export parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "mimeType", new Google.Apis.Discovery.Parameter
                    {
                        Name = "mimeType",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }

        /// <summary>Generates a set of file IDs which can be provided in insert requests.</summary>
        public virtual GenerateIdsRequest GenerateIds()
        {
            return new GenerateIdsRequest(service);
        }

        /// <summary>Generates a set of file IDs which can be provided in insert requests.</summary>
        public class GenerateIdsRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.GeneratedIds>
        {
            /// <summary>Constructs a new GenerateIds request.</summary>
            public GenerateIdsRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>Maximum number of IDs to return.</summary>
            /// [default: 10]
            /// [minimum: 1]
            /// [maximum: 1000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>The space in which the IDs can be used to create new files. Supported values are 'drive' and
            /// 'appDataFolder'.</summary>
            /// [default: drive]
            [Google.Apis.Util.RequestParameterAttribute("space", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Space { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "generateIds"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/generateIds"; }
            }

            /// <summary>Initializes GenerateIds parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "10",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "space", new Google.Apis.Discovery.Parameter
                    {
                        Name = "space",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "drive",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets a file's metadata by ID.</summary>
        /// <param name="fileId">The ID for the file in question.</param>
        public virtual GetRequest Get(string fileId)
        {
            return new GetRequest(service, fileId);
        }

        /// <summary>Gets a file's metadata by ID.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.File>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>The ID for the file in question.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Whether the user is acknowledging the risk of downloading known malware or other abusive
            /// files.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("acknowledgeAbuse", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> AcknowledgeAbuse { get; set; }

            /// <summary>This parameter is deprecated and has no function.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>This parameter is deprecated and has no function.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Deprecated</summary>
                [Google.Apis.Util.StringValueAttribute("BASIC")]
                BASIC,
                /// <summary>Deprecated</summary>
                [Google.Apis.Util.StringValueAttribute("FULL")]
                FULL,
            }

            /// <summary>Specifies the Revision ID that should be downloaded. Ignored unless alt=media is
            /// specified.</summary>
            [Google.Apis.Util.RequestParameterAttribute("revisionId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string RevisionId { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an
            /// empty request body.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("updateViewedDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UpdateViewedDate { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "acknowledgeAbuse", new Google.Apis.Discovery.Parameter
                    {
                        Name = "acknowledgeAbuse",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "revisionId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "revisionId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "updateViewedDate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "updateViewedDate",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }

        /// <summary>Insert a new file.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual InsertRequest Insert(Google.Apis.Drive.v2.Data.File body)
        {
            return new InsertRequest(service, body);
        }

        /// <summary>Insert a new file.</summary>
        public class InsertRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.File>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.File body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }


            /// <summary>Whether to convert this file to the corresponding Google Docs format.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("convert", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Convert { get; set; }

            /// <summary>Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("ocr", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Ocr { get; set; }

            /// <summary>If ocr is true, hints at the language to use. Valid values are BCP 47 codes.</summary>
            [Google.Apis.Util.RequestParameterAttribute("ocrLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OcrLanguage { get; set; }

            /// <summary>Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned
            /// revisions.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("pinned", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Pinned { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>The language of the timed text.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextLanguage { get; set; }

            /// <summary>The timed text track name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextTrackName", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextTrackName { get; set; }

            /// <summary>Whether to use the content as indexable text.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("useContentAsIndexableText", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UseContentAsIndexableText { get; set; }

            /// <summary>The visibility of the new file. This parameter is only relevant when convert=false.</summary>
            /// [default: DEFAULT]
            [Google.Apis.Util.RequestParameterAttribute("visibility", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<VisibilityEnum> Visibility { get; set; }

            /// <summary>The visibility of the new file. This parameter is only relevant when convert=false.</summary>
            public enum VisibilityEnum
            {
                /// <summary>The visibility of the new file is determined by the user's default visibility/sharing
                /// policies.</summary>
                [Google.Apis.Util.StringValueAttribute("DEFAULT")]
                DEFAULT__,
                /// <summary>The new file will be visible to only the owner.</summary>
                [Google.Apis.Util.StringValueAttribute("PRIVATE")]
                PRIVATE__,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.File Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "convert", new Google.Apis.Discovery.Parameter
                    {
                        Name = "convert",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "ocr", new Google.Apis.Discovery.Parameter
                    {
                        Name = "ocr",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "ocrLanguage", new Google.Apis.Discovery.Parameter
                    {
                        Name = "ocrLanguage",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pinned", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pinned",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "timedTextLanguage", new Google.Apis.Discovery.Parameter
                    {
                        Name = "timedTextLanguage",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "timedTextTrackName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "timedTextTrackName",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "useContentAsIndexableText", new Google.Apis.Discovery.Parameter
                    {
                        Name = "useContentAsIndexableText",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "visibility", new Google.Apis.Discovery.Parameter
                    {
                        Name = "visibility",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "DEFAULT",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Insert a new file.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="stream">The stream to upload.</param>
        /// <param name="contentType">The content type of the stream to upload.</param>
        public virtual InsertMediaUpload Insert(Google.Apis.Drive.v2.Data.File body, System.IO.Stream stream, string contentType)
        {
            return new InsertMediaUpload(service, body, stream, contentType);
        }

        /// <summary>Insert media upload which supports resumable upload.</summary>
        public class InsertMediaUpload : Google.Apis.Upload.ResumableUpload<Google.Apis.Drive.v2.Data.File, Google.Apis.Drive.v2.Data.File>
        {

            /// <summary>Data format for the response.</summary>
            /// [default: json]
            [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<AltEnum> Alt { get; set; }

            /// <summary>Data format for the response.</summary>
            public enum AltEnum
            {
                /// <summary>Responses with Content-Type of application/json</summary>
                [Google.Apis.Util.StringValueAttribute("json")]
                Json,
            }

            /// <summary>Selector specifying which fields to include in a partial response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Fields { get; set; }

            /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and
            /// reports. Required unless you provide an OAuth 2.0 token.</summary>
            [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Key { get; set; }

            /// <summary>OAuth 2.0 token for the current user.</summary>
            [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OauthToken { get; set; }

            /// <summary>Returns response with indentations and line breaks.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> PrettyPrint { get; set; }

            /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
            /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are
            /// provided.</summary>
            [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string QuotaUser { get; set; }

            /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
            /// limits.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserIp { get; set; }


            /// <summary>Whether to convert this file to the corresponding Google Docs format.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("convert", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Convert { get; set; }

            /// <summary>Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("ocr", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Ocr { get; set; }

            /// <summary>If ocr is true, hints at the language to use. Valid values are BCP 47 codes.</summary>
            [Google.Apis.Util.RequestParameterAttribute("ocrLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OcrLanguage { get; set; }

            /// <summary>Whether to pin the head revision of the uploaded file. A file can have a maximum of 200 pinned
            /// revisions.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("pinned", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Pinned { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>The language of the timed text.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextLanguage { get; set; }

            /// <summary>The timed text track name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextTrackName", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextTrackName { get; set; }

            /// <summary>Whether to use the content as indexable text.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("useContentAsIndexableText", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UseContentAsIndexableText { get; set; }

            /// <summary>The visibility of the new file. This parameter is only relevant when convert=false.</summary>
            /// [default: DEFAULT]
            [Google.Apis.Util.RequestParameterAttribute("visibility", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<VisibilityEnum> Visibility { get; set; }

            /// <summary>The visibility of the new file. This parameter is only relevant when convert=false.</summary>
            public enum VisibilityEnum
            {
                /// <summary>The visibility of the new file is determined by the user's default visibility/sharing
                /// policies.</summary>
                [Google.Apis.Util.StringValueAttribute("DEFAULT")]
                DEFAULT__,
                /// <summary>The new file will be visible to only the owner.</summary>
                [Google.Apis.Util.StringValueAttribute("PRIVATE")]
                PRIVATE__,
            }

            /// <summary>Constructs a new Insert media upload instance.</summary>
            public InsertMediaUpload(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.File body, System.IO.Stream stream, string contentType)
                : base(service, string.Format("/{0}/{1}{2}", "upload", service.BasePath, "files"), "POST", stream, contentType)
            {
                Body = body;
            }
        }

        /// <summary>Lists the user's files.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>Lists the user's files.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.FileList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>Comma-separated list of bodies of items (files/documents) to which the query applies. Supported
            /// bodies are 'default', 'domain', 'teamDrive' and 'allTeamDrives'. 'allTeamDrives' must be combined with
            /// 'default'; all other values must be used in isolation. Prefer 'default' or 'teamDrive' to
            /// 'allTeamDrives' for efficiency.</summary>
            [Google.Apis.Util.RequestParameterAttribute("corpora", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Corpora { get; set; }

            /// <summary>The body of items (files/documents) to which the query applies. Deprecated: use 'corpora'
            /// instead.</summary>
            [Google.Apis.Util.RequestParameterAttribute("corpus", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<CorpusEnum> Corpus { get; set; }

            /// <summary>The body of items (files/documents) to which the query applies. Deprecated: use 'corpora'
            /// instead.</summary>
            public enum CorpusEnum
            {
                /// <summary>The items that the user has accessed.</summary>
                [Google.Apis.Util.StringValueAttribute("DEFAULT")]
                DEFAULT__,
                /// <summary>Items shared to the user's domain.</summary>
                [Google.Apis.Util.StringValueAttribute("DOMAIN")]
                DOMAIN,
            }

            /// <summary>Whether Team Drive items should be included in results.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("includeTeamDriveItems", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeTeamDriveItems { get; set; }

            /// <summary>Maximum number of files to return.</summary>
            /// [default: 100]
            /// [minimum: 0]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder',
            /// 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency',
            /// 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending by default, but may be reversed
            /// with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there
            /// is a current limitation for users with approximately one million files in which the requested sort order
            /// is ignored.</summary>
            [Google.Apis.Util.RequestParameterAttribute("orderBy", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OrderBy { get; set; }

            /// <summary>Page token for files.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>This parameter is deprecated and has no function.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>This parameter is deprecated and has no function.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Deprecated</summary>
                [Google.Apis.Util.StringValueAttribute("BASIC")]
                BASIC,
                /// <summary>Deprecated</summary>
                [Google.Apis.Util.StringValueAttribute("FULL")]
                FULL,
            }

            /// <summary>Query string for searching files.</summary>
            [Google.Apis.Util.RequestParameterAttribute("q", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Q { get; set; }

            /// <summary>A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and
            /// 'photos'.</summary>
            [Google.Apis.Util.RequestParameterAttribute("spaces", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Spaces { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>ID of Team Drive to search.</summary>
            [Google.Apis.Util.RequestParameterAttribute("teamDriveId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TeamDriveId { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "corpora", new Google.Apis.Discovery.Parameter
                    {
                        Name = "corpora",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "corpus", new Google.Apis.Discovery.Parameter
                    {
                        Name = "corpus",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeTeamDriveItems", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeTeamDriveItems",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "100",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "orderBy", new Google.Apis.Discovery.Parameter
                    {
                        Name = "orderBy",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "q", new Google.Apis.Discovery.Parameter
                    {
                        Name = "q",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "spaces", new Google.Apis.Discovery.Parameter
                    {
                        Name = "spaces",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "teamDriveId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "teamDriveId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates file metadata and/or content. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file to update.</param>
        public virtual PatchRequest Patch(Google.Apis.Drive.v2.Data.File body, string fileId)
        {
            return new PatchRequest(service, body, fileId);
        }

        /// <summary>Updates file metadata and/or content. This method supports patch semantics.</summary>
        public class PatchRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.File>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.File body, string fileId)
                : base(service)
            {
                FileId = fileId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file to update.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Comma-separated list of parent IDs to add.</summary>
            [Google.Apis.Util.RequestParameterAttribute("addParents", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string AddParents { get; set; }

            /// <summary>This parameter is deprecated and has no function.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("convert", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Convert { get; set; }

            /// <summary>Determines the behavior in which modifiedDate is updated. This overrides
            /// setModifiedDate.</summary>
            [Google.Apis.Util.RequestParameterAttribute("modifiedDateBehavior", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ModifiedDateBehaviorEnum> ModifiedDateBehavior { get; set; }

            /// <summary>Determines the behavior in which modifiedDate is updated. This overrides
            /// setModifiedDate.</summary>
            public enum ModifiedDateBehaviorEnum
            {
                /// <summary>Set modifiedDate to the value provided in the body of the request. No change if no value
                /// was provided.</summary>
                [Google.Apis.Util.StringValueAttribute("fromBody")]
                FromBody,
                /// <summary>Set modifiedDate to the value provided in the body of the request depending on other
                /// contents of the update.</summary>
                [Google.Apis.Util.StringValueAttribute("fromBodyIfNeeded")]
                FromBodyIfNeeded,
                /// <summary>Set modifiedDate to the value provided in the body of the request, or to the current time
                /// if no value was provided.</summary>
                [Google.Apis.Util.StringValueAttribute("fromBodyOrNow")]
                FromBodyOrNow,
                /// <summary>Maintain the previous value of modifiedDate.</summary>
                [Google.Apis.Util.StringValueAttribute("noChange")]
                NoChange,
                /// <summary>Set modifiedDate to the current time.</summary>
                [Google.Apis.Util.StringValueAttribute("now")]
                Now,
                /// <summary>Set modifiedDate to the current time depending on contents of the update.</summary>
                [Google.Apis.Util.StringValueAttribute("nowIfNeeded")]
                NowIfNeeded,
            }

            /// <summary>Whether a blob upload should create a new revision. If false, the blob data in the current head
            /// revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned
            /// revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using
            /// additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained,
            /// see the Drive Help Center.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("newRevision", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> NewRevision { get; set; }

            /// <summary>Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("ocr", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Ocr { get; set; }

            /// <summary>If ocr is true, hints at the language to use. Valid values are BCP 47 codes.</summary>
            [Google.Apis.Util.RequestParameterAttribute("ocrLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OcrLanguage { get; set; }

            /// <summary>Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("pinned", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Pinned { get; set; }

            /// <summary>Comma-separated list of parent IDs to remove.</summary>
            [Google.Apis.Util.RequestParameterAttribute("removeParents", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string RemoveParents { get; set; }

            /// <summary>Whether to set the modified date with the supplied modified date.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("setModifiedDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SetModifiedDate { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>The language of the timed text.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextLanguage { get; set; }

            /// <summary>The timed text track name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextTrackName", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextTrackName { get; set; }

            /// <summary>Whether to update the view date after successfully updating the file.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("updateViewedDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UpdateViewedDate { get; set; }

            /// <summary>Whether to use the content as indexable text.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("useContentAsIndexableText", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UseContentAsIndexableText { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.File Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "addParents", new Google.Apis.Discovery.Parameter
                    {
                        Name = "addParents",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "convert", new Google.Apis.Discovery.Parameter
                    {
                        Name = "convert",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "modifiedDateBehavior", new Google.Apis.Discovery.Parameter
                    {
                        Name = "modifiedDateBehavior",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "newRevision", new Google.Apis.Discovery.Parameter
                    {
                        Name = "newRevision",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "true",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "ocr", new Google.Apis.Discovery.Parameter
                    {
                        Name = "ocr",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "ocrLanguage", new Google.Apis.Discovery.Parameter
                    {
                        Name = "ocrLanguage",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pinned", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pinned",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "removeParents", new Google.Apis.Discovery.Parameter
                    {
                        Name = "removeParents",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "setModifiedDate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "setModifiedDate",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "timedTextLanguage", new Google.Apis.Discovery.Parameter
                    {
                        Name = "timedTextLanguage",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "timedTextTrackName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "timedTextTrackName",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "updateViewedDate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "updateViewedDate",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "true",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "useContentAsIndexableText", new Google.Apis.Discovery.Parameter
                    {
                        Name = "useContentAsIndexableText",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Set the file's updated time to the current server time.</summary>
        /// <param name="fileId">The ID of the file to update.</param>
        public virtual TouchRequest Touch(string fileId)
        {
            return new TouchRequest(service, fileId);
        }

        /// <summary>Set the file's updated time to the current server time.</summary>
        public class TouchRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.File>
        {
            /// <summary>Constructs a new Touch request.</summary>
            public TouchRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                InitParameters();
            }


            /// <summary>The ID of the file to update.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "touch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/touch"; }
            }

            /// <summary>Initializes Touch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Moves a file to the trash. The currently authenticated user must own the file or be an organizer on
        /// the parent for Team Drive files.</summary>
        /// <param name="fileId">The ID of the file to trash.</param>
        public virtual TrashRequest Trash(string fileId)
        {
            return new TrashRequest(service, fileId);
        }

        /// <summary>Moves a file to the trash. The currently authenticated user must own the file or be an organizer on
        /// the parent for Team Drive files.</summary>
        public class TrashRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.File>
        {
            /// <summary>Constructs a new Trash request.</summary>
            public TrashRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                InitParameters();
            }


            /// <summary>The ID of the file to trash.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "trash"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/trash"; }
            }

            /// <summary>Initializes Trash parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Restores a file from the trash.</summary>
        /// <param name="fileId">The ID of the file to untrash.</param>
        public virtual UntrashRequest Untrash(string fileId)
        {
            return new UntrashRequest(service, fileId);
        }

        /// <summary>Restores a file from the trash.</summary>
        public class UntrashRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.File>
        {
            /// <summary>Constructs a new Untrash request.</summary>
            public UntrashRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                InitParameters();
            }


            /// <summary>The ID of the file to untrash.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "untrash"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/untrash"; }
            }

            /// <summary>Initializes Untrash parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates file metadata and/or content.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file to update.</param>
        public virtual UpdateRequest Update(Google.Apis.Drive.v2.Data.File body, string fileId)
        {
            return new UpdateRequest(service, body, fileId);
        }

        /// <summary>Updates file metadata and/or content.</summary>
        public class UpdateRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.File>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.File body, string fileId)
                : base(service)
            {
                FileId = fileId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file to update.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Comma-separated list of parent IDs to add.</summary>
            [Google.Apis.Util.RequestParameterAttribute("addParents", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string AddParents { get; set; }

            /// <summary>This parameter is deprecated and has no function.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("convert", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Convert { get; set; }

            /// <summary>Determines the behavior in which modifiedDate is updated. This overrides
            /// setModifiedDate.</summary>
            [Google.Apis.Util.RequestParameterAttribute("modifiedDateBehavior", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ModifiedDateBehaviorEnum> ModifiedDateBehavior { get; set; }

            /// <summary>Determines the behavior in which modifiedDate is updated. This overrides
            /// setModifiedDate.</summary>
            public enum ModifiedDateBehaviorEnum
            {
                /// <summary>Set modifiedDate to the value provided in the body of the request. No change if no value
                /// was provided.</summary>
                [Google.Apis.Util.StringValueAttribute("fromBody")]
                FromBody,
                /// <summary>Set modifiedDate to the value provided in the body of the request depending on other
                /// contents of the update.</summary>
                [Google.Apis.Util.StringValueAttribute("fromBodyIfNeeded")]
                FromBodyIfNeeded,
                /// <summary>Set modifiedDate to the value provided in the body of the request, or to the current time
                /// if no value was provided.</summary>
                [Google.Apis.Util.StringValueAttribute("fromBodyOrNow")]
                FromBodyOrNow,
                /// <summary>Maintain the previous value of modifiedDate.</summary>
                [Google.Apis.Util.StringValueAttribute("noChange")]
                NoChange,
                /// <summary>Set modifiedDate to the current time.</summary>
                [Google.Apis.Util.StringValueAttribute("now")]
                Now,
                /// <summary>Set modifiedDate to the current time depending on contents of the update.</summary>
                [Google.Apis.Util.StringValueAttribute("nowIfNeeded")]
                NowIfNeeded,
            }

            /// <summary>Whether a blob upload should create a new revision. If false, the blob data in the current head
            /// revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned
            /// revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using
            /// additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained,
            /// see the Drive Help Center.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("newRevision", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> NewRevision { get; set; }

            /// <summary>Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("ocr", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Ocr { get; set; }

            /// <summary>If ocr is true, hints at the language to use. Valid values are BCP 47 codes.</summary>
            [Google.Apis.Util.RequestParameterAttribute("ocrLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OcrLanguage { get; set; }

            /// <summary>Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("pinned", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Pinned { get; set; }

            /// <summary>Comma-separated list of parent IDs to remove.</summary>
            [Google.Apis.Util.RequestParameterAttribute("removeParents", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string RemoveParents { get; set; }

            /// <summary>Whether to set the modified date with the supplied modified date.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("setModifiedDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SetModifiedDate { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>The language of the timed text.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextLanguage { get; set; }

            /// <summary>The timed text track name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextTrackName", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextTrackName { get; set; }

            /// <summary>Whether to update the view date after successfully updating the file.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("updateViewedDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UpdateViewedDate { get; set; }

            /// <summary>Whether to use the content as indexable text.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("useContentAsIndexableText", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UseContentAsIndexableText { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.File Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "addParents", new Google.Apis.Discovery.Parameter
                    {
                        Name = "addParents",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "convert", new Google.Apis.Discovery.Parameter
                    {
                        Name = "convert",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "modifiedDateBehavior", new Google.Apis.Discovery.Parameter
                    {
                        Name = "modifiedDateBehavior",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "newRevision", new Google.Apis.Discovery.Parameter
                    {
                        Name = "newRevision",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "true",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "ocr", new Google.Apis.Discovery.Parameter
                    {
                        Name = "ocr",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "ocrLanguage", new Google.Apis.Discovery.Parameter
                    {
                        Name = "ocrLanguage",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pinned", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pinned",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "removeParents", new Google.Apis.Discovery.Parameter
                    {
                        Name = "removeParents",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "setModifiedDate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "setModifiedDate",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "timedTextLanguage", new Google.Apis.Discovery.Parameter
                    {
                        Name = "timedTextLanguage",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "timedTextTrackName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "timedTextTrackName",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "updateViewedDate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "updateViewedDate",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "true",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "useContentAsIndexableText", new Google.Apis.Discovery.Parameter
                    {
                        Name = "useContentAsIndexableText",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates file metadata and/or content.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file to update.</param>
        /// <param name="stream">The stream to upload.</param>
        /// <param name="contentType">The content type of the stream to upload.</param>
        public virtual UpdateMediaUpload Update(Google.Apis.Drive.v2.Data.File body, string fileId, System.IO.Stream stream, string contentType)
        {
            return new UpdateMediaUpload(service, body, fileId, stream, contentType);
        }

        /// <summary>Update media upload which supports resumable upload.</summary>
        public class UpdateMediaUpload : Google.Apis.Upload.ResumableUpload<Google.Apis.Drive.v2.Data.File, Google.Apis.Drive.v2.Data.File>
        {

            /// <summary>Data format for the response.</summary>
            /// [default: json]
            [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<AltEnum> Alt { get; set; }

            /// <summary>Data format for the response.</summary>
            public enum AltEnum
            {
                /// <summary>Responses with Content-Type of application/json</summary>
                [Google.Apis.Util.StringValueAttribute("json")]
                Json,
            }

            /// <summary>Selector specifying which fields to include in a partial response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Fields { get; set; }

            /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and
            /// reports. Required unless you provide an OAuth 2.0 token.</summary>
            [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Key { get; set; }

            /// <summary>OAuth 2.0 token for the current user.</summary>
            [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OauthToken { get; set; }

            /// <summary>Returns response with indentations and line breaks.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> PrettyPrint { get; set; }

            /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
            /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are
            /// provided.</summary>
            [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string QuotaUser { get; set; }

            /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
            /// limits.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserIp { get; set; }


            /// <summary>The ID of the file to update.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Comma-separated list of parent IDs to add.</summary>
            [Google.Apis.Util.RequestParameterAttribute("addParents", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string AddParents { get; set; }

            /// <summary>This parameter is deprecated and has no function.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("convert", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Convert { get; set; }

            /// <summary>Determines the behavior in which modifiedDate is updated. This overrides
            /// setModifiedDate.</summary>
            [Google.Apis.Util.RequestParameterAttribute("modifiedDateBehavior", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ModifiedDateBehaviorEnum> ModifiedDateBehavior { get; set; }

            /// <summary>Determines the behavior in which modifiedDate is updated. This overrides
            /// setModifiedDate.</summary>
            public enum ModifiedDateBehaviorEnum
            {
                /// <summary>Set modifiedDate to the value provided in the body of the request. No change if no value
                /// was provided.</summary>
                [Google.Apis.Util.StringValueAttribute("fromBody")]
                FromBody,
                /// <summary>Set modifiedDate to the value provided in the body of the request depending on other
                /// contents of the update.</summary>
                [Google.Apis.Util.StringValueAttribute("fromBodyIfNeeded")]
                FromBodyIfNeeded,
                /// <summary>Set modifiedDate to the value provided in the body of the request, or to the current time
                /// if no value was provided.</summary>
                [Google.Apis.Util.StringValueAttribute("fromBodyOrNow")]
                FromBodyOrNow,
                /// <summary>Maintain the previous value of modifiedDate.</summary>
                [Google.Apis.Util.StringValueAttribute("noChange")]
                NoChange,
                /// <summary>Set modifiedDate to the current time.</summary>
                [Google.Apis.Util.StringValueAttribute("now")]
                Now,
                /// <summary>Set modifiedDate to the current time depending on contents of the update.</summary>
                [Google.Apis.Util.StringValueAttribute("nowIfNeeded")]
                NowIfNeeded,
            }

            /// <summary>Whether a blob upload should create a new revision. If false, the blob data in the current head
            /// revision is replaced. If true or not set, a new blob is created as head revision, and previous unpinned
            /// revisions are preserved for a short period of time. Pinned revisions are stored indefinitely, using
            /// additional storage quota, up to a maximum of 200 revisions. For details on how revisions are retained,
            /// see the Drive Help Center.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("newRevision", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> NewRevision { get; set; }

            /// <summary>Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("ocr", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Ocr { get; set; }

            /// <summary>If ocr is true, hints at the language to use. Valid values are BCP 47 codes.</summary>
            [Google.Apis.Util.RequestParameterAttribute("ocrLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OcrLanguage { get; set; }

            /// <summary>Whether to pin the new revision. A file can have a maximum of 200 pinned revisions.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("pinned", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Pinned { get; set; }

            /// <summary>Comma-separated list of parent IDs to remove.</summary>
            [Google.Apis.Util.RequestParameterAttribute("removeParents", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string RemoveParents { get; set; }

            /// <summary>Whether to set the modified date with the supplied modified date.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("setModifiedDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SetModifiedDate { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>The language of the timed text.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextLanguage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextLanguage { get; set; }

            /// <summary>The timed text track name.</summary>
            [Google.Apis.Util.RequestParameterAttribute("timedTextTrackName", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string TimedTextTrackName { get; set; }

            /// <summary>Whether to update the view date after successfully updating the file.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("updateViewedDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UpdateViewedDate { get; set; }

            /// <summary>Whether to use the content as indexable text.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("useContentAsIndexableText", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UseContentAsIndexableText { get; set; }

            /// <summary>Constructs a new Update media upload instance.</summary>
            public UpdateMediaUpload(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.File body, string
             fileId, System.IO.Stream stream, string contentType)
                : base(service, string.Format("/{0}/{1}{2}", "upload", service.BasePath, "files/{fileId}"), "PUT", stream, contentType)
            {
                FileId = fileId;
                Body = body;
            }
        }

        /// <summary>Subscribe to changes on a file</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID for the file in question.</param>
        public virtual WatchRequest Watch(Google.Apis.Drive.v2.Data.Channel body, string fileId)
        {
            return new WatchRequest(service, body, fileId);
        }

        /// <summary>Subscribe to changes on a file</summary>
        public class WatchRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Channel>
        {
            /// <summary>Constructs a new Watch request.</summary>
            public WatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Channel body, string fileId)
                : base(service)
            {
                FileId = fileId;
                Body = body;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>The ID for the file in question.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Whether the user is acknowledging the risk of downloading known malware or other abusive
            /// files.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("acknowledgeAbuse", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> AcknowledgeAbuse { get; set; }

            /// <summary>This parameter is deprecated and has no function.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>This parameter is deprecated and has no function.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Deprecated</summary>
                [Google.Apis.Util.StringValueAttribute("BASIC")]
                BASIC,
                /// <summary>Deprecated</summary>
                [Google.Apis.Util.StringValueAttribute("FULL")]
                FULL,
            }

            /// <summary>Specifies the Revision ID that should be downloaded. Ignored unless alt=media is
            /// specified.</summary>
            [Google.Apis.Util.RequestParameterAttribute("revisionId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string RevisionId { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>Deprecated: Use files.update with modifiedDateBehavior=noChange, updateViewedDate=true and an
            /// empty request body.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("updateViewedDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UpdateViewedDate { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Channel Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "watch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/watch"; }
            }

            /// <summary>Initializes Watch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "acknowledgeAbuse", new Google.Apis.Discovery.Parameter
                    {
                        Name = "acknowledgeAbuse",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "revisionId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "revisionId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "updateViewedDate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "updateViewedDate",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }
    }

    /// <summary>The "parents" collection of methods.</summary>
    public class ParentsResource
    {
        private const string Resource = "parents";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ParentsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Removes a parent from a file.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="parentId">The ID of the parent.</param>
        public virtual DeleteRequest Delete(string fileId, string parentId)
        {
            return new DeleteRequest(service, fileId, parentId);
        }

        /// <summary>Removes a parent from a file.</summary>
        public class DeleteRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string fileId, string parentId)
                : base(service)
            {
                FileId = fileId;
                ParentId = parentId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the parent.</summary>
            [Google.Apis.Util.RequestParameterAttribute("parentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ParentId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/parents/{parentId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "parentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "parentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets a specific parent reference.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="parentId">The ID of the parent.</param>
        public virtual GetRequest Get(string fileId, string parentId)
        {
            return new GetRequest(service, fileId, parentId);
        }

        /// <summary>Gets a specific parent reference.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.ParentReference>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string fileId, string parentId)
                : base(service)
            {
                FileId = fileId;
                ParentId = parentId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the parent.</summary>
            [Google.Apis.Util.RequestParameterAttribute("parentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ParentId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/parents/{parentId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "parentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "parentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Adds a parent folder for a file.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file.</param>
        public virtual InsertRequest Insert(Google.Apis.Drive.v2.Data.ParentReference body, string fileId)
        {
            return new InsertRequest(service, body, fileId);
        }

        /// <summary>Adds a parent folder for a file.</summary>
        public class InsertRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.ParentReference>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.ParentReference body, string fileId)
                : base(service)
            {
                FileId = fileId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.ParentReference Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/parents"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists a file's parents.</summary>
        /// <param name="fileId">The ID of the file.</param>
        public virtual ListRequest List(string fileId)
        {
            return new ListRequest(service, fileId);
        }

        /// <summary>Lists a file's parents.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.ParentList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/parents"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "permissions" collection of methods.</summary>
    public class PermissionsResource
    {
        private const string Resource = "permissions";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public PermissionsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a permission from a file or Team Drive.</summary>
        /// <param name="fileId">The ID for the file or Team Drive.</param>
        /// <param name="permissionId">The ID for the
        /// permission.</param>
        public virtual DeleteRequest Delete(string fileId, string permissionId)
        {
            return new DeleteRequest(service, fileId, permissionId);
        }

        /// <summary>Deletes a permission from a file or Team Drive.</summary>
        public class DeleteRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string fileId, string permissionId)
                : base(service)
            {
                FileId = fileId;
                PermissionId = permissionId;
                InitParameters();
            }


            /// <summary>The ID for the file or Team Drive.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID for the permission.</summary>
            [Google.Apis.Util.RequestParameterAttribute("permissionId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PermissionId { get; private set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/permissions/{permissionId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "permissionId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "permissionId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets a permission by ID.</summary>
        /// <param name="fileId">The ID for the file or Team Drive.</param>
        /// <param name="permissionId">The ID for the
        /// permission.</param>
        public virtual GetRequest Get(string fileId, string permissionId)
        {
            return new GetRequest(service, fileId, permissionId);
        }

        /// <summary>Gets a permission by ID.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Permission>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string fileId, string permissionId)
                : base(service)
            {
                FileId = fileId;
                PermissionId = permissionId;
                InitParameters();
            }


            /// <summary>The ID for the file or Team Drive.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID for the permission.</summary>
            [Google.Apis.Util.RequestParameterAttribute("permissionId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PermissionId { get; private set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/permissions/{permissionId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "permissionId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "permissionId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Returns the permission ID for an email address.</summary>
        /// <param name="email">The email address for which to return a permission ID</param>
        public virtual GetIdForEmailRequest GetIdForEmail(string email)
        {
            return new GetIdForEmailRequest(service, email);
        }

        /// <summary>Returns the permission ID for an email address.</summary>
        public class GetIdForEmailRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.PermissionId>
        {
            /// <summary>Constructs a new GetIdForEmail request.</summary>
            public GetIdForEmailRequest(Google.Apis.Services.IClientService service, string email)
                : base(service)
            {
                Email = email;
                InitParameters();
            }


            /// <summary>The email address for which to return a permission ID</summary>
            [Google.Apis.Util.RequestParameterAttribute("email", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Email { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "getIdForEmail"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "permissionIds/{email}"; }
            }

            /// <summary>Initializes GetIdForEmail parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "email", new Google.Apis.Discovery.Parameter
                    {
                        Name = "email",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Inserts a permission for a file or Team Drive.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID for the file or Team Drive.</param>
        public virtual InsertRequest Insert(Google.Apis.Drive.v2.Data.Permission body, string fileId)
        {
            return new InsertRequest(service, body, fileId);
        }

        /// <summary>Inserts a permission for a file or Team Drive.</summary>
        public class InsertRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Permission>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Permission body, string fileId)
                : base(service)
            {
                FileId = fileId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID for the file or Team Drive.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>A custom message to include in notification emails.</summary>
            [Google.Apis.Util.RequestParameterAttribute("emailMessage", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string EmailMessage { get; set; }

            /// <summary>Whether to send notification emails when sharing to users or groups. This parameter is ignored
            /// and an email is sent if the role is owner.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("sendNotificationEmails", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SendNotificationEmails { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Permission Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/permissions"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "emailMessage", new Google.Apis.Discovery.Parameter
                    {
                        Name = "emailMessage",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "sendNotificationEmails", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sendNotificationEmails",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "true",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists a file's or Team Drive's permissions.</summary>
        /// <param name="fileId">The ID for the file or Team Drive.</param>
        public virtual ListRequest List(string fileId)
        {
            return new ListRequest(service, fileId);
        }

        /// <summary>Lists a file's or Team Drive's permissions.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.PermissionList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                InitParameters();
            }


            /// <summary>The ID for the file or Team Drive.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The maximum number of permissions to return per page. When not set for files in a Team Drive,
            /// at most 100 results will be returned. When not set for files that are not in a Team Drive, the entire
            /// list will be returned.</summary>
            /// [minimum: 1]
            /// [maximum: 100]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>The token for continuing a previous list request on the next page. This should be set to the
            /// value of 'nextPageToken' from the previous response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/permissions"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a permission using patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID for the file or Team Drive.</param>
        /// <param name="permissionId">The ID for the
        /// permission.</param>
        public virtual PatchRequest Patch(Google.Apis.Drive.v2.Data.Permission body, string fileId, string permissionId)
        {
            return new PatchRequest(service, body, fileId, permissionId);
        }

        /// <summary>Updates a permission using patch semantics.</summary>
        public class PatchRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Permission>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Permission body, string fileId, string permissionId)
                : base(service)
            {
                FileId = fileId;
                PermissionId = permissionId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID for the file or Team Drive.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID for the permission.</summary>
            [Google.Apis.Util.RequestParameterAttribute("permissionId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PermissionId { get; private set; }

            /// <summary>Whether to remove the expiration date.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("removeExpiration", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> RemoveExpiration { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if
            /// the specified role is not 'owner'.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("transferOwnership", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> TransferOwnership { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Permission Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/permissions/{permissionId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "permissionId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "permissionId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "removeExpiration", new Google.Apis.Discovery.Parameter
                    {
                        Name = "removeExpiration",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "transferOwnership", new Google.Apis.Discovery.Parameter
                    {
                        Name = "transferOwnership",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a permission.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID for the file or Team Drive.</param>
        /// <param name="permissionId">The ID for the
        /// permission.</param>
        public virtual UpdateRequest Update(Google.Apis.Drive.v2.Data.Permission body, string fileId, string permissionId)
        {
            return new UpdateRequest(service, body, fileId, permissionId);
        }

        /// <summary>Updates a permission.</summary>
        public class UpdateRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Permission>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Permission body, string fileId, string permissionId)
                : base(service)
            {
                FileId = fileId;
                PermissionId = permissionId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID for the file or Team Drive.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID for the permission.</summary>
            [Google.Apis.Util.RequestParameterAttribute("permissionId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PermissionId { get; private set; }

            /// <summary>Whether to remove the expiration date.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("removeExpiration", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> RemoveExpiration { get; set; }

            /// <summary>Whether the requesting application supports Team Drives.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("supportsTeamDrives", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> SupportsTeamDrives { get; set; }

            /// <summary>Whether changing a role to 'owner' downgrades the current owners to writers. Does nothing if
            /// the specified role is not 'owner'.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("transferOwnership", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> TransferOwnership { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Permission Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/permissions/{permissionId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "permissionId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "permissionId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "removeExpiration", new Google.Apis.Discovery.Parameter
                    {
                        Name = "removeExpiration",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "supportsTeamDrives", new Google.Apis.Discovery.Parameter
                    {
                        Name = "supportsTeamDrives",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "transferOwnership", new Google.Apis.Discovery.Parameter
                    {
                        Name = "transferOwnership",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "properties" collection of methods.</summary>
    public class PropertiesResource
    {
        private const string Resource = "properties";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public PropertiesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a property.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="propertyKey">The key of the
        /// property.</param>
        public virtual DeleteRequest Delete(string fileId, string propertyKey)
        {
            return new DeleteRequest(service, fileId, propertyKey);
        }

        /// <summary>Deletes a property.</summary>
        public class DeleteRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string fileId, string propertyKey)
                : base(service)
            {
                FileId = fileId;
                PropertyKey = propertyKey;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The key of the property.</summary>
            [Google.Apis.Util.RequestParameterAttribute("propertyKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PropertyKey { get; private set; }

            /// <summary>The visibility of the property.</summary>
            /// [default: private]
            [Google.Apis.Util.RequestParameterAttribute("visibility", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Visibility { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/properties/{propertyKey}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "propertyKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "propertyKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "visibility", new Google.Apis.Discovery.Parameter
                    {
                        Name = "visibility",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "private",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets a property by its key.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="propertyKey">The key of the
        /// property.</param>
        public virtual GetRequest Get(string fileId, string propertyKey)
        {
            return new GetRequest(service, fileId, propertyKey);
        }

        /// <summary>Gets a property by its key.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Property>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string fileId, string propertyKey)
                : base(service)
            {
                FileId = fileId;
                PropertyKey = propertyKey;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The key of the property.</summary>
            [Google.Apis.Util.RequestParameterAttribute("propertyKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PropertyKey { get; private set; }

            /// <summary>The visibility of the property.</summary>
            /// [default: private]
            [Google.Apis.Util.RequestParameterAttribute("visibility", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Visibility { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/properties/{propertyKey}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "propertyKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "propertyKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "visibility", new Google.Apis.Discovery.Parameter
                    {
                        Name = "visibility",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "private",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Adds a property to a file, or updates it if it already exists.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file.</param>
        public virtual InsertRequest Insert(Google.Apis.Drive.v2.Data.Property body, string fileId)
        {
            return new InsertRequest(service, body, fileId);
        }

        /// <summary>Adds a property to a file, or updates it if it already exists.</summary>
        public class InsertRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Property>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Property body, string fileId)
                : base(service)
            {
                FileId = fileId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Property Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/properties"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists a file's properties.</summary>
        /// <param name="fileId">The ID of the file.</param>
        public virtual ListRequest List(string fileId)
        {
            return new ListRequest(service, fileId);
        }

        /// <summary>Lists a file's properties.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.PropertyList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/properties"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a property, or adds it if it doesn't exist. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="propertyKey">The key of the
        /// property.</param>
        public virtual PatchRequest Patch(Google.Apis.Drive.v2.Data.Property body, string fileId, string propertyKey)
        {
            return new PatchRequest(service, body, fileId, propertyKey);
        }

        /// <summary>Updates a property, or adds it if it doesn't exist. This method supports patch semantics.</summary>
        public class PatchRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Property>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Property body, string fileId, string propertyKey)
                : base(service)
            {
                FileId = fileId;
                PropertyKey = propertyKey;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The key of the property.</summary>
            [Google.Apis.Util.RequestParameterAttribute("propertyKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PropertyKey { get; private set; }

            /// <summary>The visibility of the property.</summary>
            /// [default: private]
            [Google.Apis.Util.RequestParameterAttribute("visibility", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Visibility { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Property Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/properties/{propertyKey}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "propertyKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "propertyKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "visibility", new Google.Apis.Discovery.Parameter
                    {
                        Name = "visibility",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "private",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a property, or adds it if it doesn't exist.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="propertyKey">The key of the
        /// property.</param>
        public virtual UpdateRequest Update(Google.Apis.Drive.v2.Data.Property body, string fileId, string propertyKey)
        {
            return new UpdateRequest(service, body, fileId, propertyKey);
        }

        /// <summary>Updates a property, or adds it if it doesn't exist.</summary>
        public class UpdateRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Property>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Property body, string fileId, string propertyKey)
                : base(service)
            {
                FileId = fileId;
                PropertyKey = propertyKey;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The key of the property.</summary>
            [Google.Apis.Util.RequestParameterAttribute("propertyKey", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PropertyKey { get; private set; }

            /// <summary>The visibility of the property.</summary>
            /// [default: private]
            [Google.Apis.Util.RequestParameterAttribute("visibility", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Visibility { get; set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Property Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/properties/{propertyKey}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "propertyKey", new Google.Apis.Discovery.Parameter
                    {
                        Name = "propertyKey",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "visibility", new Google.Apis.Discovery.Parameter
                    {
                        Name = "visibility",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "private",
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "realtime" collection of methods.</summary>
    public class RealtimeResource
    {
        private const string Resource = "realtime";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public RealtimeResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Exports the contents of the Realtime API data model associated with this file as JSON.</summary>
        /// <param name="fileId">The ID of the file that the Realtime API data model is associated with.</param>
        public virtual GetRequest Get(string fileId)
        {
            return new GetRequest(service, fileId);
        }

        /// <summary>Exports the contents of the Realtime API data model associated with this file as JSON.</summary>
        public class GetRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>The ID of the file that the Realtime API data model is associated with.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The revision of the Realtime API data model to export. Revisions start at 1 (the initial empty
            /// data model) and are incremented with each change. If this parameter is excluded, the most recent data
            /// model will be returned.</summary>
            /// [minimum: 1]
            [Google.Apis.Util.RequestParameterAttribute("revision", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> Revision { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/realtime"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "revision", new Google.Apis.Discovery.Parameter
                    {
                        Name = "revision",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }

        /// <summary>Overwrites the Realtime API data model associated with this file with the provided JSON data
        /// model.</summary>
        /// <param name="fileId">The ID of the file that the Realtime API data model is associated with.</param>
        public virtual UpdateRequest Update(string fileId)
        {
            return new UpdateRequest(service, fileId);
        }

        /// <summary>Overwrites the Realtime API data model associated with this file with the provided JSON data
        /// model.</summary>
        public class UpdateRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                InitParameters();
            }


            /// <summary>The ID of the file that the Realtime API data model is associated with.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The revision of the model to diff the uploaded model against. If set, the uploaded model is
            /// diffed against the provided revision and those differences are merged with any changes made to the model
            /// after the provided revision. If not set, the uploaded model replaces the current model on the
            /// server.</summary>
            [Google.Apis.Util.RequestParameterAttribute("baseRevision", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string BaseRevision { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/realtime"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "baseRevision", new Google.Apis.Discovery.Parameter
                    {
                        Name = "baseRevision",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Overwrites the Realtime API data model associated with this file with the provided JSON data
        /// model.</summary>

        /// <param name="fileId">The ID of the file that the Realtime API data model is associated with.</param>
        /// <param name="stream">The stream to upload.</param>
        /// <param name="contentType">The content type of the stream to upload.</param>
        public virtual UpdateMediaUpload Update(string fileId, System.IO.Stream stream, string contentType)
        {
            return new UpdateMediaUpload(service, fileId, stream, contentType);
        }

        /// <summary>Update media upload which supports resumable upload.</summary>
        public class UpdateMediaUpload : Google.Apis.Upload.ResumableUpload<string>
        {

            /// <summary>Data format for the response.</summary>
            /// [default: json]
            [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<AltEnum> Alt { get; set; }

            /// <summary>Data format for the response.</summary>
            public enum AltEnum
            {
                /// <summary>Responses with Content-Type of application/json</summary>
                [Google.Apis.Util.StringValueAttribute("json")]
                Json,
            }

            /// <summary>Selector specifying which fields to include in a partial response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Fields { get; set; }

            /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and
            /// reports. Required unless you provide an OAuth 2.0 token.</summary>
            [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Key { get; set; }

            /// <summary>OAuth 2.0 token for the current user.</summary>
            [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OauthToken { get; set; }

            /// <summary>Returns response with indentations and line breaks.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> PrettyPrint { get; set; }

            /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
            /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are
            /// provided.</summary>
            [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string QuotaUser { get; set; }

            /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
            /// limits.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserIp { get; set; }


            /// <summary>The ID of the file that the Realtime API data model is associated with.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The revision of the model to diff the uploaded model against. If set, the uploaded model is
            /// diffed against the provided revision and those differences are merged with any changes made to the model
            /// after the provided revision. If not set, the uploaded model replaces the current model on the
            /// server.</summary>
            [Google.Apis.Util.RequestParameterAttribute("baseRevision", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string BaseRevision { get; set; }

            /// <summary>Constructs a new Update media upload instance.</summary>
            public UpdateMediaUpload(Google.Apis.Services.IClientService service, string
             fileId, System.IO.Stream stream, string contentType)
                : base(service, string.Format("/{0}/{1}{2}", "upload", service.BasePath, "files/{fileId}/realtime"), "PUT", stream, contentType)
            {
                FileId = fileId;
            }
        }
    }

    /// <summary>The "replies" collection of methods.</summary>
    public class RepliesResource
    {
        private const string Resource = "replies";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public RepliesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a reply.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="commentId">The ID of the
        /// comment.</param>
        /// <param name="replyId">The ID of the reply.</param>
        public virtual DeleteRequest Delete(string fileId, string commentId, string replyId)
        {
            return new DeleteRequest(service, fileId, commentId, replyId);
        }

        /// <summary>Deletes a reply.</summary>
        public class DeleteRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string fileId, string commentId, string replyId)
                : base(service)
            {
                FileId = fileId;
                CommentId = commentId;
                ReplyId = replyId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the comment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("commentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CommentId { get; private set; }

            /// <summary>The ID of the reply.</summary>
            [Google.Apis.Util.RequestParameterAttribute("replyId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ReplyId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments/{commentId}/replies/{replyId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "commentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "commentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "replyId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "replyId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets a reply.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="commentId">The ID of the
        /// comment.</param>
        /// <param name="replyId">The ID of the reply.</param>
        public virtual GetRequest Get(string fileId, string commentId, string replyId)
        {
            return new GetRequest(service, fileId, commentId, replyId);
        }

        /// <summary>Gets a reply.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.CommentReply>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string fileId, string commentId, string replyId)
                : base(service)
            {
                FileId = fileId;
                CommentId = commentId;
                ReplyId = replyId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the comment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("commentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CommentId { get; private set; }

            /// <summary>The ID of the reply.</summary>
            [Google.Apis.Util.RequestParameterAttribute("replyId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ReplyId { get; private set; }

            /// <summary>If set, this will succeed when retrieving a deleted reply.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("includeDeleted", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeDeleted { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments/{commentId}/replies/{replyId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "commentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "commentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "replyId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "replyId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeDeleted", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeDeleted",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new reply to the given comment.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="commentId">The ID of the comment.</param>
        public virtual InsertRequest Insert(Google.Apis.Drive.v2.Data.CommentReply body, string fileId, string commentId)
        {
            return new InsertRequest(service, body, fileId, commentId);
        }

        /// <summary>Creates a new reply to the given comment.</summary>
        public class InsertRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.CommentReply>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.CommentReply body, string fileId, string commentId)
                : base(service)
            {
                FileId = fileId;
                CommentId = commentId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the comment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("commentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CommentId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.CommentReply Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments/{commentId}/replies"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "commentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "commentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists all of the replies to a comment.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="commentId">The ID of the comment.</param>
        public virtual ListRequest List(string fileId, string commentId)
        {
            return new ListRequest(service, fileId, commentId);
        }

        /// <summary>Lists all of the replies to a comment.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.CommentReplyList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string fileId, string commentId)
                : base(service)
            {
                FileId = fileId;
                CommentId = commentId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the comment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("commentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CommentId { get; private set; }

            /// <summary>If set, all replies, including deleted replies (with content stripped) will be
            /// returned.</summary>
            /// [default: false]
            [Google.Apis.Util.RequestParameterAttribute("includeDeleted", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeDeleted { get; set; }

            /// <summary>The maximum number of replies to include in the response, used for paging.</summary>
            /// [default: 20]
            /// [minimum: 0]
            /// [maximum: 100]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>The continuation token, used to page through large result sets. To get the next page of
            /// results, set this parameter to the value of "nextPageToken" from the previous response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments/{commentId}/replies"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "commentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "commentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeDeleted", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeDeleted",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "false",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "20",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an existing reply. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="commentId">The ID of the
        /// comment.</param>
        /// <param name="replyId">The ID of the reply.</param>
        public virtual PatchRequest Patch(Google.Apis.Drive.v2.Data.CommentReply body, string fileId, string commentId, string replyId)
        {
            return new PatchRequest(service, body, fileId, commentId, replyId);
        }

        /// <summary>Updates an existing reply. This method supports patch semantics.</summary>
        public class PatchRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.CommentReply>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.CommentReply body, string fileId, string commentId, string replyId)
                : base(service)
            {
                FileId = fileId;
                CommentId = commentId;
                ReplyId = replyId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the comment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("commentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CommentId { get; private set; }

            /// <summary>The ID of the reply.</summary>
            [Google.Apis.Util.RequestParameterAttribute("replyId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ReplyId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.CommentReply Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments/{commentId}/replies/{replyId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "commentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "commentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "replyId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "replyId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an existing reply.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="commentId">The ID of the
        /// comment.</param>
        /// <param name="replyId">The ID of the reply.</param>
        public virtual UpdateRequest Update(Google.Apis.Drive.v2.Data.CommentReply body, string fileId, string commentId, string replyId)
        {
            return new UpdateRequest(service, body, fileId, commentId, replyId);
        }

        /// <summary>Updates an existing reply.</summary>
        public class UpdateRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.CommentReply>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.CommentReply body, string fileId, string commentId, string replyId)
                : base(service)
            {
                FileId = fileId;
                CommentId = commentId;
                ReplyId = replyId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the comment.</summary>
            [Google.Apis.Util.RequestParameterAttribute("commentId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CommentId { get; private set; }

            /// <summary>The ID of the reply.</summary>
            [Google.Apis.Util.RequestParameterAttribute("replyId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ReplyId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.CommentReply Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/comments/{commentId}/replies/{replyId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "commentId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "commentId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "replyId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "replyId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "revisions" collection of methods.</summary>
    public class RevisionsResource
    {
        private const string Resource = "revisions";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public RevisionsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Removes a revision.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="revisionId">The ID of the
        /// revision.</param>
        public virtual DeleteRequest Delete(string fileId, string revisionId)
        {
            return new DeleteRequest(service, fileId, revisionId);
        }

        /// <summary>Removes a revision.</summary>
        public class DeleteRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string fileId, string revisionId)
                : base(service)
            {
                FileId = fileId;
                RevisionId = revisionId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the revision.</summary>
            [Google.Apis.Util.RequestParameterAttribute("revisionId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RevisionId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/revisions/{revisionId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "revisionId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "revisionId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets a specific revision.</summary>
        /// <param name="fileId">The ID of the file.</param>
        /// <param name="revisionId">The ID of the
        /// revision.</param>
        public virtual GetRequest Get(string fileId, string revisionId)
        {
            return new GetRequest(service, fileId, revisionId);
        }

        /// <summary>Gets a specific revision.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Revision>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string fileId, string revisionId)
                : base(service)
            {
                FileId = fileId;
                RevisionId = revisionId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID of the revision.</summary>
            [Google.Apis.Util.RequestParameterAttribute("revisionId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RevisionId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/revisions/{revisionId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "revisionId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "revisionId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists a file's revisions.</summary>
        /// <param name="fileId">The ID of the file.</param>
        public virtual ListRequest List(string fileId)
        {
            return new ListRequest(service, fileId);
        }

        /// <summary>Lists a file's revisions.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.RevisionList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string fileId)
                : base(service)
            {
                FileId = fileId;
                InitParameters();
            }


            /// <summary>The ID of the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>Maximum number of revisions to return.</summary>
            /// [default: 200]
            /// [minimum: 1]
            /// [maximum: 1000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Page token for revisions. To get the next page of results, set this parameter to the value of
            /// "nextPageToken" from the previous response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/revisions"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "200",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a revision. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID for the file.</param>
        /// <param name="revisionId">The ID for the
        /// revision.</param>
        public virtual PatchRequest Patch(Google.Apis.Drive.v2.Data.Revision body, string fileId, string revisionId)
        {
            return new PatchRequest(service, body, fileId, revisionId);
        }

        /// <summary>Updates a revision. This method supports patch semantics.</summary>
        public class PatchRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Revision>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Revision body, string fileId, string revisionId)
                : base(service)
            {
                FileId = fileId;
                RevisionId = revisionId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID for the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID for the revision.</summary>
            [Google.Apis.Util.RequestParameterAttribute("revisionId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RevisionId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Revision Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/revisions/{revisionId}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "revisionId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "revisionId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a revision.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="fileId">The ID for the file.</param>
        /// <param name="revisionId">The ID for the
        /// revision.</param>
        public virtual UpdateRequest Update(Google.Apis.Drive.v2.Data.Revision body, string fileId, string revisionId)
        {
            return new UpdateRequest(service, body, fileId, revisionId);
        }

        /// <summary>Updates a revision.</summary>
        public class UpdateRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.Revision>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.Revision body, string fileId, string revisionId)
                : base(service)
            {
                FileId = fileId;
                RevisionId = revisionId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID for the file.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fileId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string FileId { get; private set; }

            /// <summary>The ID for the revision.</summary>
            [Google.Apis.Util.RequestParameterAttribute("revisionId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string RevisionId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.Revision Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "files/{fileId}/revisions/{revisionId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "fileId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "fileId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "revisionId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "revisionId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "teamdrives" collection of methods.</summary>
    public class TeamdrivesResource
    {
        private const string Resource = "teamdrives";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public TeamdrivesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain
        /// any untrashed items.</summary>
        /// <param name="teamDriveId">The ID of the Team Drive</param>
        public virtual DeleteRequest Delete(string teamDriveId)
        {
            return new DeleteRequest(service, teamDriveId);
        }

        /// <summary>Permanently deletes a Team Drive for which the user is an organizer. The Team Drive cannot contain
        /// any untrashed items.</summary>
        public class DeleteRequest : DriveBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string teamDriveId)
                : base(service)
            {
                TeamDriveId = teamDriveId;
                InitParameters();
            }


            /// <summary>The ID of the Team Drive</summary>
            [Google.Apis.Util.RequestParameterAttribute("teamDriveId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TeamDriveId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "teamdrives/{teamDriveId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "teamDriveId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "teamDriveId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets a Team Drive's metadata by ID.</summary>
        /// <param name="teamDriveId">The ID of the Team Drive</param>
        public virtual GetRequest Get(string teamDriveId)
        {
            return new GetRequest(service, teamDriveId);
        }

        /// <summary>Gets a Team Drive's metadata by ID.</summary>
        public class GetRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.TeamDrive>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string teamDriveId)
                : base(service)
            {
                TeamDriveId = teamDriveId;
                InitParameters();
            }


            /// <summary>The ID of the Team Drive</summary>
            [Google.Apis.Util.RequestParameterAttribute("teamDriveId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TeamDriveId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "teamdrives/{teamDriveId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "teamDriveId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "teamDriveId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new Team Drive.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="requestId">An ID, such as a random UUID, which uniquely identifies this user's request for idempotent
        /// creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating
        /// duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be
        /// returned.</param>
        public virtual InsertRequest Insert(Google.Apis.Drive.v2.Data.TeamDrive body, string requestId)
        {
            return new InsertRequest(service, body, requestId);
        }

        /// <summary>Creates a new Team Drive.</summary>
        public class InsertRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.TeamDrive>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.TeamDrive body, string requestId)
                : base(service)
            {
                RequestId = requestId;
                Body = body;
                InitParameters();
            }


            /// <summary>An ID, such as a random UUID, which uniquely identifies this user's request for idempotent
            /// creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid
            /// creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409
            /// error will be returned.</summary>
            [Google.Apis.Util.RequestParameterAttribute("requestId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string RequestId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.TeamDrive Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "teamdrives"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "requestId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "requestId",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists the user's Team Drives.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>Lists the user's Team Drives.</summary>
        public class ListRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.TeamDriveList>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>Maximum number of Team Drives to return.</summary>
            /// [default: 10]
            /// [minimum: 1]
            /// [maximum: 100]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Page token for Team Drives.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "teamdrives"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "10",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a Team Drive's metadata</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="teamDriveId">The ID of the Team Drive</param>
        public virtual UpdateRequest Update(Google.Apis.Drive.v2.Data.TeamDrive body, string teamDriveId)
        {
            return new UpdateRequest(service, body, teamDriveId);
        }

        /// <summary>Updates a Team Drive's metadata</summary>
        public class UpdateRequest : DriveBaseServiceRequest<Google.Apis.Drive.v2.Data.TeamDrive>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Drive.v2.Data.TeamDrive body, string teamDriveId)
                : base(service)
            {
                TeamDriveId = teamDriveId;
                Body = body;
                InitParameters();
            }


            /// <summary>The ID of the Team Drive</summary>
            [Google.Apis.Util.RequestParameterAttribute("teamDriveId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string TeamDriveId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Drive.v2.Data.TeamDrive Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "teamdrives/{teamDriveId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "teamDriveId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "teamDriveId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.Drive.v2.Data
{    

    /// <summary>An item with user information and settings.</summary>
    public class About : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Information about supported additional roles per file type. The most specific type takes
        /// precedence.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("additionalRoleInfo")]
        public virtual System.Collections.Generic.IList<About.AdditionalRoleInfoData> AdditionalRoleInfo { get; set; } 

        /// <summary>The domain sharing policy for the current user. Possible values are: - allowed - allowedWithWarning
        /// - incomingOnly - disallowed</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domainSharingPolicy")]
        public virtual string DomainSharingPolicy { get; set; } 

        /// <summary>The ETag of the item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The allowable export formats.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("exportFormats")]
        public virtual System.Collections.Generic.IList<About.ExportFormatsData> ExportFormats { get; set; } 

        /// <summary>List of additional features enabled on this account.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("features")]
        public virtual System.Collections.Generic.IList<About.FeaturesData> Features { get; set; } 

        /// <summary>The palette of allowable folder colors as RGB hex strings.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("folderColorPalette")]
        public virtual System.Collections.Generic.IList<string> FolderColorPalette { get; set; } 

        /// <summary>The allowable import formats.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("importFormats")]
        public virtual System.Collections.Generic.IList<About.ImportFormatsData> ImportFormats { get; set; } 

        /// <summary>A boolean indicating whether the authenticated app is installed by the authenticated
        /// user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isCurrentAppInstalled")]
        public virtual System.Nullable<bool> IsCurrentAppInstalled { get; set; } 

        /// <summary>This is always drive#about.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The user's language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML
        /// format (http://www.unicode.org/reports/tr35/).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("languageCode")]
        public virtual string LanguageCode { get; set; } 

        /// <summary>The largest change id.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("largestChangeId")]
        public virtual System.Nullable<long> LargestChangeId { get; set; } 

        /// <summary>List of max upload sizes for each file type. The most specific type takes precedence.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxUploadSizes")]
        public virtual System.Collections.Generic.IList<About.MaxUploadSizesData> MaxUploadSizes { get; set; } 

        /// <summary>The name of the current user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The current user's ID as visible in the permissions collection.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("permissionId")]
        public virtual string PermissionId { get; set; } 

        /// <summary>The amount of storage quota used by different Google services.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaBytesByService")]
        public virtual System.Collections.Generic.IList<About.QuotaBytesByServiceData> QuotaBytesByService { get; set; } 

        /// <summary>The total number of quota bytes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaBytesTotal")]
        public virtual System.Nullable<long> QuotaBytesTotal { get; set; } 

        /// <summary>The number of quota bytes used by Google Drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaBytesUsed")]
        public virtual System.Nullable<long> QuotaBytesUsed { get; set; } 

        /// <summary>The number of quota bytes used by all Google apps (Drive, Picasa, etc.).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaBytesUsedAggregate")]
        public virtual System.Nullable<long> QuotaBytesUsedAggregate { get; set; } 

        /// <summary>The number of quota bytes used by trashed items.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaBytesUsedInTrash")]
        public virtual System.Nullable<long> QuotaBytesUsedInTrash { get; set; } 

        /// <summary>The type of the user's storage quota. Possible values are: - LIMITED - UNLIMITED</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaType")]
        public virtual string QuotaType { get; set; } 

        /// <summary>The number of remaining change ids, limited to no more than 2500.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("remainingChangeIds")]
        public virtual System.Nullable<long> RemainingChangeIds { get; set; } 

        /// <summary>The id of the root folder.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rootFolderId")]
        public virtual string RootFolderId { get; set; } 

        /// <summary>A link back to this item.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The authenticated user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("user")]
        public virtual User User { get; set; } 

        

        public class AdditionalRoleInfoData
        {
            /// <summary>The supported additional roles per primary role.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("roleSets")]
            public virtual System.Collections.Generic.IList<AdditionalRoleInfoData.RoleSetsData> RoleSets { get; set; } 

            /// <summary>The content type that this additional role info applies to.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; } 

            

            public class RoleSetsData
            {
                /// <summary>The supported additional roles with the primary role.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("additionalRoles")]
                public virtual System.Collections.Generic.IList<string> AdditionalRoles { get; set; } 

                /// <summary>A primary permission role.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("primaryRole")]
                public virtual string PrimaryRole { get; set; } 

            }
        }    

        public class ExportFormatsData
        {
            /// <summary>The content type to convert from.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("source")]
            public virtual string Source { get; set; } 

            /// <summary>The possible content types to convert to.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("targets")]
            public virtual System.Collections.Generic.IList<string> Targets { get; set; } 

        }    

        public class FeaturesData
        {
            /// <summary>The name of the feature.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("featureName")]
            public virtual string FeatureName { get; set; } 

            /// <summary>The request limit rate for this feature, in queries per second.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("featureRate")]
            public virtual System.Nullable<double> FeatureRate { get; set; } 

        }    

        public class ImportFormatsData
        {
            /// <summary>The imported file's content type to convert from.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("source")]
            public virtual string Source { get; set; } 

            /// <summary>The possible content types to convert to.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("targets")]
            public virtual System.Collections.Generic.IList<string> Targets { get; set; } 

        }    

        public class MaxUploadSizesData
        {
            /// <summary>The max upload size for this type.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("size")]
            public virtual System.Nullable<long> Size { get; set; } 

            /// <summary>The file type.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; } 

        }    

        public class QuotaBytesByServiceData
        {
            /// <summary>The storage quota bytes used by the service.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("bytesUsed")]
            public virtual System.Nullable<long> BytesUsed { get; set; } 

            /// <summary>The service's name, e.g. DRIVE, GMAIL, or PHOTOS.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("serviceName")]
            public virtual string ServiceName { get; set; } 

        }
    }    

    /// <summary>The apps resource provides a list of the apps that a user has installed, with information about each
    /// app's supported MIME types, file extensions, and other details.</summary>
    public class App : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether the app is authorized to access data on the user's Drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("authorized")]
        public virtual System.Nullable<bool> Authorized { get; set; } 

        /// <summary>The template url to create a new file with this app in a given folder. The template will contain
        /// {folderId} to be replaced by the folder to create the new file in.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createInFolderTemplate")]
        public virtual string CreateInFolderTemplate { get; set; } 

        /// <summary>The url to create a new file with this app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createUrl")]
        public virtual string CreateUrl { get; set; } 

        /// <summary>Whether the app has drive-wide scope. An app with drive-wide scope can access all files in the
        /// user's drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("hasDriveWideScope")]
        public virtual System.Nullable<bool> HasDriveWideScope { get; set; } 

        /// <summary>The various icons for the app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("icons")]
        public virtual System.Collections.Generic.IList<App.IconsData> Icons { get; set; } 

        /// <summary>The ID of the app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Whether the app is installed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("installed")]
        public virtual System.Nullable<bool> Installed { get; set; } 

        /// <summary>This is always drive#app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A long description of the app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("longDescription")]
        public virtual string LongDescription { get; set; } 

        /// <summary>The name of the app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The type of object this app creates (e.g. Chart). If empty, the app name should be used
        /// instead.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("objectType")]
        public virtual string ObjectType { get; set; } 

        /// <summary>The template url for opening files with this app. The template will contain {ids} and/or
        /// {exportIds} to be replaced by the actual file ids. See  Open Files  for the full documentation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("openUrlTemplate")]
        public virtual string OpenUrlTemplate { get; set; } 

        /// <summary>The list of primary file extensions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primaryFileExtensions")]
        public virtual System.Collections.Generic.IList<string> PrimaryFileExtensions { get; set; } 

        /// <summary>The list of primary mime types.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primaryMimeTypes")]
        public virtual System.Collections.Generic.IList<string> PrimaryMimeTypes { get; set; } 

        /// <summary>The ID of the product listing for this app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("productId")]
        public virtual string ProductId { get; set; } 

        /// <summary>A link to the product listing for this app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("productUrl")]
        public virtual string ProductUrl { get; set; } 

        /// <summary>The list of secondary file extensions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("secondaryFileExtensions")]
        public virtual System.Collections.Generic.IList<string> SecondaryFileExtensions { get; set; } 

        /// <summary>The list of secondary mime types.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("secondaryMimeTypes")]
        public virtual System.Collections.Generic.IList<string> SecondaryMimeTypes { get; set; } 

        /// <summary>A short description of the app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shortDescription")]
        public virtual string ShortDescription { get; set; } 

        /// <summary>Whether this app supports creating new objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("supportsCreate")]
        public virtual System.Nullable<bool> SupportsCreate { get; set; } 

        /// <summary>Whether this app supports importing Google Docs.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("supportsImport")]
        public virtual System.Nullable<bool> SupportsImport { get; set; } 

        /// <summary>Whether this app supports opening more than one file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("supportsMultiOpen")]
        public virtual System.Nullable<bool> SupportsMultiOpen { get; set; } 

        /// <summary>Whether this app supports creating new files when offline.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("supportsOfflineCreate")]
        public virtual System.Nullable<bool> SupportsOfflineCreate { get; set; } 

        /// <summary>Whether the app is selected as the default handler for the types it supports.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("useByDefault")]
        public virtual System.Nullable<bool> UseByDefault { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        public class IconsData
        {
            /// <summary>Category of the icon. Allowed values are: - application - icon for the application - document -
            /// icon for a file associated with the app - documentShared - icon for a shared file associated with the
            /// app</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("category")]
            public virtual string Category { get; set; } 

            /// <summary>URL for the icon.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("iconUrl")]
            public virtual string IconUrl { get; set; } 

            /// <summary>Size of the icon. Represented as the maximum of the width and height.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("size")]
            public virtual System.Nullable<int> Size { get; set; } 

        }
    }    

    /// <summary>A list of third-party applications which the user has installed or given access to Google
    /// Drive.</summary>
    public class AppList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>List of app IDs that the user has specified to use by default. The list is in reverse-priority
        /// order (lowest to highest).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("defaultAppIds")]
        public virtual System.Collections.Generic.IList<string> DefaultAppIds { get; set; } 

        /// <summary>The ETag of the list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The list of apps.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<App> Items { get; set; } 

        /// <summary>This is always drive#appList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A link back to this list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

    }    

    /// <summary>Representation of a change to a file or Team Drive.</summary>
    public class Change : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether the file or Team Drive has been removed from this list of changes, for example by deletion
        /// or loss of access.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("deleted")]
        public virtual System.Nullable<bool> Deleted { get; set; } 

        /// <summary>The updated state of the file. Present if the type is file and the file has not been removed from
        /// this list of changes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("file")]
        public virtual File File { get; set; } 

        /// <summary>The ID of the file associated with this change.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileId")]
        public virtual string FileId { get; set; } 

        /// <summary>The ID of the change.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual System.Nullable<long> Id { get; set; } 

        /// <summary>This is always drive#change.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The time of this modification.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("modificationDate")]
        public virtual string ModificationDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="ModificationDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> ModificationDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(ModificationDateRaw);
            }
            set
            {
                ModificationDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>A link back to this change.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The updated state of the Team Drive. Present if the type is teamDrive, the user is still a member
        /// of the Team Drive, and the Team Drive has not been deleted.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("teamDrive")]
        public virtual TeamDrive TeamDrive { get; set; } 

        /// <summary>The ID of the Team Drive associated with this change.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("teamDriveId")]
        public virtual string TeamDriveId { get; set; } 

        /// <summary>The type of the change. Possible values are file and teamDrive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A list of changes for a user.</summary>
    public class ChangeList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The list of changes. If nextPageToken is populated, then this list may be incomplete and an
        /// additional page of results should be fetched.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Change> Items { get; set; } 

        /// <summary>This is always drive#changeList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The current largest change ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("largestChangeId")]
        public virtual System.Nullable<long> LargestChangeId { get; set; } 

        /// <summary>The starting page token for future changes. This will be present only if the end of the current
        /// changes list has been reached.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("newStartPageToken")]
        public virtual string NewStartPageToken { get; set; } 

        /// <summary>A link to the next page of changes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextLink")]
        public virtual string NextLink { get; set; } 

        /// <summary>The page token for the next page of changes. This will be absent if the end of the changes list has
        /// been reached. If the token is rejected for any reason, it should be discarded, and pagination should be
        /// restarted from the first page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>A link back to this list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

    }    

    /// <summary>An notification channel used to watch for resource changes.</summary>
    public class Channel : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The address where notifications are delivered for this channel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("address")]
        public virtual string Address { get; set; } 

        /// <summary>Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds.
        /// Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expiration")]
        public virtual System.Nullable<long> Expiration { get; set; } 

        /// <summary>A UUID or similar unique string that identifies this channel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed
        /// string "api#channel".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Additional parameters controlling delivery channel behavior. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("params")]
        public virtual System.Collections.Generic.IDictionary<string,string> Params__ { get; set; } 

        /// <summary>A Boolean value to indicate whether payload is wanted. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("payload")]
        public virtual System.Nullable<bool> Payload { get; set; } 

        /// <summary>An opaque ID that identifies the resource being watched on this channel. Stable across different
        /// API versions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceId")]
        public virtual string ResourceId { get; set; } 

        /// <summary>A version-specific identifier for the watched resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceUri")]
        public virtual string ResourceUri { get; set; } 

        /// <summary>An arbitrary string delivered to the target address with each notification delivered over this
        /// channel. Optional.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("token")]
        public virtual string Token { get; set; } 

        /// <summary>The type of delivery mechanism used for this channel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A list of children of a file.</summary>
    public class ChildList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The list of children. If nextPageToken is populated, then this list may be incomplete and an
        /// additional page of results should be fetched.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<ChildReference> Items { get; set; } 

        /// <summary>This is always drive#childList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A link to the next page of children.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextLink")]
        public virtual string NextLink { get; set; } 

        /// <summary>The page token for the next page of children. This will be absent if the end of the children list
        /// has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be
        /// restarted from the first page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>A link back to this list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

    }    

    /// <summary>A reference to a folder's child.</summary>
    public class ChildReference : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A link to the child.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("childLink")]
        public virtual string ChildLink { get; set; } 

        /// <summary>The ID of the child.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>This is always drive#childReference.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A link back to this reference.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A comment on a file in Google Drive.</summary>
    public class Comment : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A region of the document represented as a JSON string. See anchor documentation for details on how
        /// to define and interpret anchor properties.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("anchor")]
        public virtual string Anchor { get; set; } 

        /// <summary>The user who wrote this comment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("author")]
        public virtual User Author { get; set; } 

        /// <summary>The ID of the comment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("commentId")]
        public virtual string CommentId { get; set; } 

        /// <summary>The plain text content used to create this comment. This is not HTML safe and should only be used
        /// as a starting point to make edits to a comment's content.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("content")]
        public virtual string Content { get; set; } 

        /// <summary>The context of the file which is being commented on.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("context")]
        public virtual Comment.ContextData Context { get; set; } 

        /// <summary>The date when this comment was first created.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createdDate")]
        public virtual string CreatedDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="CreatedDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> CreatedDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(CreatedDateRaw);
            }
            set
            {
                CreatedDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Whether this comment has been deleted. If a comment has been deleted the content will be cleared
        /// and this will only represent a comment that once existed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("deleted")]
        public virtual System.Nullable<bool> Deleted { get; set; } 

        /// <summary>The file which this comment is addressing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileId")]
        public virtual string FileId { get; set; } 

        /// <summary>The title of the file which this comment is addressing.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileTitle")]
        public virtual string FileTitle { get; set; } 

        /// <summary>HTML formatted content for this comment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("htmlContent")]
        public virtual string HtmlContent { get; set; } 

        /// <summary>This is always drive#comment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The date when this comment or any of its replies were last modified.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("modifiedDate")]
        public virtual string ModifiedDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="ModifiedDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> ModifiedDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(ModifiedDateRaw);
            }
            set
            {
                ModifiedDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Replies to this post.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("replies")]
        public virtual System.Collections.Generic.IList<CommentReply> Replies { get; set; } 

        /// <summary>A link back to this comment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The status of this comment. Status can be changed by posting a reply to a comment with the desired
        /// status. - "open" - The comment is still open. - "resolved" - The comment has been resolved by one of its
        /// replies.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>The context of the file which is being commented on.</summary>
        public class ContextData
        {
            /// <summary>The MIME type of the context snippet.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; } 

            /// <summary>Data representation of the segment of the file being commented on. In the case of a text file
            /// for example, this would be the actual text that the comment is about.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("value")]
            public virtual string Value { get; set; } 

        }
    }    

    /// <summary>A list of comments on a file in Google Drive.</summary>
    public class CommentList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of comments. If nextPageToken is populated, then this list may be incomplete and an
        /// additional page of results should be fetched.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Comment> Items { get; set; } 

        /// <summary>This is always drive#commentList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A link to the next page of comments.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextLink")]
        public virtual string NextLink { get; set; } 

        /// <summary>The page token for the next page of comments. This will be absent if the end of the comments list
        /// has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be
        /// restarted from the first page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>A link back to this list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A comment on a file in Google Drive.</summary>
    public class CommentReply : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The user who wrote this reply.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("author")]
        public virtual User Author { get; set; } 

        /// <summary>The plain text content used to create this reply. This is not HTML safe and should only be used as
        /// a starting point to make edits to a reply's content. This field is required on inserts if no verb is
        /// specified (resolve/reopen).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("content")]
        public virtual string Content { get; set; } 

        /// <summary>The date when this reply was first created.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createdDate")]
        public virtual string CreatedDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="CreatedDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> CreatedDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(CreatedDateRaw);
            }
            set
            {
                CreatedDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Whether this reply has been deleted. If a reply has been deleted the content will be cleared and
        /// this will only represent a reply that once existed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("deleted")]
        public virtual System.Nullable<bool> Deleted { get; set; } 

        /// <summary>HTML formatted content for this reply.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("htmlContent")]
        public virtual string HtmlContent { get; set; } 

        /// <summary>This is always drive#commentReply.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The date when this reply was last modified.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("modifiedDate")]
        public virtual string ModifiedDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="ModifiedDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> ModifiedDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(ModifiedDateRaw);
            }
            set
            {
                ModifiedDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The ID of the reply.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("replyId")]
        public virtual string ReplyId { get; set; } 

        /// <summary>The action this reply performed to the parent comment. When creating a new reply this is the action
        /// to be perform to the parent comment. Possible values are: - "resolve" - To resolve a comment. - "reopen" -
        /// To reopen (un-resolve) a comment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("verb")]
        public virtual string Verb { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A list of replies to a comment on a file in Google Drive.</summary>
    public class CommentReplyList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of replies. If nextPageToken is populated, then this list may be incomplete and an
        /// additional page of results should be fetched.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<CommentReply> Items { get; set; } 

        /// <summary>This is always drive#commentReplyList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A link to the next page of replies.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextLink")]
        public virtual string NextLink { get; set; } 

        /// <summary>The page token for the next page of replies. This will be absent if the end of the replies list has
        /// been reached. If the token is rejected for any reason, it should be discarded, and pagination should be
        /// restarted from the first page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>A link back to this list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The metadata for a file.</summary>
    public class File : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A link for opening the file in a relevant Google editor or viewer.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("alternateLink")]
        public virtual string AlternateLink { get; set; } 

        /// <summary>Whether this file is in the Application Data folder.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("appDataContents")]
        public virtual System.Nullable<bool> AppDataContents { get; set; } 

        /// <summary>Whether the current user can comment on the file. Deprecated: use
        /// capabilities/canComment.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("canComment")]
        public virtual System.Nullable<bool> CanComment { get; set; } 

        /// <summary>Whether the current user has read access to the Revisions resource of the file. Deprecated: use
        /// capabilities/canReadRevisions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("canReadRevisions")]
        public virtual System.Nullable<bool> CanReadRevisions { get; set; } 

        /// <summary>Capabilities the current user has on the file. Each capability corresponds to a fine-grained action
        /// that a user may take.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("capabilities")]
        public virtual File.CapabilitiesData Capabilities { get; set; } 

        /// <summary>Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("copyable")]
        public virtual System.Nullable<bool> Copyable { get; set; } 

        /// <summary>Create time for this file (formatted RFC 3339 timestamp).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createdDate")]
        public virtual string CreatedDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="CreatedDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> CreatedDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(CreatedDateRaw);
            }
            set
            {
                CreatedDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>A link to open this file with the user's default app for this file. Only populated when the
        /// drive.apps.readonly scope is used.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("defaultOpenWithLink")]
        public virtual string DefaultOpenWithLink { get; set; } 

        /// <summary>A short description of the file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("downloadUrl")]
        public virtual string DownloadUrl { get; set; } 

        /// <summary>Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("editable")]
        public virtual System.Nullable<bool> Editable { get; set; } 

        /// <summary>A link for embedding the file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("embedLink")]
        public virtual string EmbedLink { get; set; } 

        /// <summary>ETag of the file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Whether this file has been explicitly trashed, as opposed to recursively trashed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("explicitlyTrashed")]
        public virtual System.Nullable<bool> ExplicitlyTrashed { get; set; } 

        /// <summary>Links for exporting Google Docs to specific formats.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("exportLinks")]
        public virtual System.Collections.Generic.IDictionary<string,string> ExportLinks { get; set; } 

        /// <summary>The final component of fullFileExtension with trailing text that does not appear to be part of the
        /// extension removed. This field is only populated for files with content stored in Drive; it is not populated
        /// for Google Docs or shortcut files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileExtension")]
        public virtual string FileExtension { get; set; } 

        /// <summary>The size of the file in bytes. This field is only populated for files with content stored in Drive;
        /// it is not populated for Google Docs or shortcut files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileSize")]
        public virtual System.Nullable<long> FileSize { get; set; } 

        /// <summary>Folder color as an RGB hex string if the file is a folder. The list of supported colors is
        /// available in the folderColorPalette field of the About resource. If an unsupported color is specified, it
        /// will be changed to the closest color in the palette. Not populated for Team Drive files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("folderColorRgb")]
        public virtual string FolderColorRgb { get; set; } 

        /// <summary>The full file extension; extracted from the title. May contain multiple concatenated extensions,
        /// such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the
        /// extension on the title does update this field. This field is only populated for files with content stored in
        /// Drive; it is not populated for Google Docs or shortcut files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fullFileExtension")]
        public virtual string FullFileExtension { get; set; } 

        /// <summary>Whether any users are granted file access directly on this file. This field is only populated for
        /// Team Drive files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("hasAugmentedPermissions")]
        public virtual System.Nullable<bool> HasAugmentedPermissions { get; set; } 

        /// <summary>Whether this file has a thumbnail.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("hasThumbnail")]
        public virtual System.Nullable<bool> HasThumbnail { get; set; } 

        /// <summary>The ID of the file's head revision. This field is only populated for files with content stored in
        /// Drive; it is not populated for Google Docs or shortcut files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("headRevisionId")]
        public virtual string HeadRevisionId { get; set; } 

        /// <summary>A link to the file's icon.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("iconLink")]
        public virtual string IconLink { get; set; } 

        /// <summary>The ID of the file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Metadata about image media. This will only be present for image types, and its contents will depend
        /// on what can be parsed from the image content.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("imageMediaMetadata")]
        public virtual File.ImageMediaMetadataData ImageMediaMetadata { get; set; } 

        /// <summary>Indexable text attributes for the file (can only be written)</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("indexableText")]
        public virtual File.IndexableTextData IndexableText { get; set; } 

        /// <summary>Whether the file was created or opened by the requesting app.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isAppAuthorized")]
        public virtual System.Nullable<bool> IsAppAuthorized { get; set; } 

        /// <summary>The type of file. This is always drive#file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A group of labels for the file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual File.LabelsData Labels { get; set; } 

        /// <summary>The last user to modify this file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastModifyingUser")]
        public virtual User LastModifyingUser { get; set; } 

        /// <summary>Name of the last user to modify this file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastModifyingUserName")]
        public virtual string LastModifyingUserName { get; set; } 

        /// <summary>Last time this file was viewed by the user (formatted RFC 3339 timestamp).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastViewedByMeDate")]
        public virtual string LastViewedByMeDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="LastViewedByMeDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> LastViewedByMeDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(LastViewedByMeDateRaw);
            }
            set
            {
                LastViewedByMeDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Deprecated.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("markedViewedByMeDate")]
        public virtual string MarkedViewedByMeDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="MarkedViewedByMeDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> MarkedViewedByMeDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(MarkedViewedByMeDateRaw);
            }
            set
            {
                MarkedViewedByMeDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>An MD5 checksum for the content of this file. This field is only populated for files with content
        /// stored in Drive; it is not populated for Google Docs or shortcut files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("md5Checksum")]
        public virtual string Md5Checksum { get; set; } 

        /// <summary>The MIME type of the file. This is only mutable on update when uploading new content. This field
        /// can be left blank, and the mimetype will be determined from the uploaded content's MIME type.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mimeType")]
        public virtual string MimeType { get; set; } 

        /// <summary>Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting
        /// modifiedDate will also update the modifiedByMe date for the user which set the date.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("modifiedByMeDate")]
        public virtual string ModifiedByMeDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="ModifiedByMeDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> ModifiedByMeDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(ModifiedByMeDateRaw);
            }
            set
            {
                ModifiedByMeDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on
        /// update when the setModifiedDate parameter is set.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("modifiedDate")]
        public virtual string ModifiedDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="ModifiedDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> ModifiedDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(ModifiedDateRaw);
            }
            set
            {
                ModifiedDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>A map of the id of each of the user's apps to a link to open this file with that app. Only
        /// populated when the drive.apps.readonly scope is used.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("openWithLinks")]
        public virtual System.Collections.Generic.IDictionary<string,string> OpenWithLinks { get; set; } 

        /// <summary>The original filename of the uploaded content if available, or else the original value of the title
        /// field. This is only available for files with binary content in Drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("originalFilename")]
        public virtual string OriginalFilename { get; set; } 

        /// <summary>Whether the file is owned by the current user. Not populated for Team Drive files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ownedByMe")]
        public virtual System.Nullable<bool> OwnedByMe { get; set; } 

        /// <summary>Name(s) of the owner(s) of this file. Not populated for Team Drive files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ownerNames")]
        public virtual System.Collections.Generic.IList<string> OwnerNames { get; set; } 

        /// <summary>The owner(s) of this file. Not populated for Team Drive files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("owners")]
        public virtual System.Collections.Generic.IList<User> Owners { get; set; } 

        /// <summary>Collection of parent folders which contain this file. Setting this field will put the file in all
        /// of the provided folders. On insert, if no folders are provided, the file will be placed in the default root
        /// folder.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("parents")]
        public virtual System.Collections.Generic.IList<ParentReference> Parents { get; set; } 

        /// <summary>The list of permissions for users with access to this file. Not populated for Team Drive
        /// files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("permissions")]
        public virtual System.Collections.Generic.IList<Permission> Permissions { get; set; } 

        /// <summary>The list of properties.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("properties")]
        public virtual System.Collections.Generic.IList<Property> Properties { get; set; } 

        /// <summary>The number of quota bytes used by this file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("quotaBytesUsed")]
        public virtual System.Nullable<long> QuotaBytesUsed { get; set; } 

        /// <summary>A link back to this file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>Whether the file's sharing settings can be modified by the current user. Deprecated: use
        /// capabilities/canShare.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shareable")]
        public virtual System.Nullable<bool> Shareable { get; set; } 

        /// <summary>Whether the file has been shared. Not populated for Team Drive files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("shared")]
        public virtual System.Nullable<bool> Shared { get; set; } 

        /// <summary>Time at which this file was shared with the user (formatted RFC 3339 timestamp).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sharedWithMeDate")]
        public virtual string SharedWithMeDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="SharedWithMeDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> SharedWithMeDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(SharedWithMeDateRaw);
            }
            set
            {
                SharedWithMeDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>User that shared the item with the current user, if available.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sharingUser")]
        public virtual User SharingUser { get; set; } 

        /// <summary>The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and
        /// 'photos'.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("spaces")]
        public virtual System.Collections.Generic.IList<string> Spaces { get; set; } 

        /// <summary>ID of the Team Drive the file resides in.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("teamDriveId")]
        public virtual string TeamDriveId { get; set; } 

        /// <summary>A thumbnail for the file. This will only be used if Drive cannot generate a standard
        /// thumbnail.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("thumbnail")]
        public virtual File.ThumbnailData Thumbnail { get; set; } 

        /// <summary>A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated
        /// when the requesting app can access the file's content.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("thumbnailLink")]
        public virtual string ThumbnailLink { get; set; } 

        /// <summary>The thumbnail version for use in thumbnail cache invalidation.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("thumbnailVersion")]
        public virtual System.Nullable<long> ThumbnailVersion { get; set; } 

        /// <summary>The title of this file. Note that for immutable items such as the top level folders of Team Drives,
        /// My Drive root folder, and Application Data folder the title is constant.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("title")]
        public virtual string Title { get; set; } 

        /// <summary>The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive
        /// files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("trashedDate")]
        public virtual string TrashedDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="TrashedDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> TrashedDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(TrashedDateRaw);
            }
            set
            {
                TrashedDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive
        /// files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("trashingUser")]
        public virtual User TrashingUser { get; set; } 

        /// <summary>The permissions for the authenticated user on this file.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("userPermission")]
        public virtual Permission UserPermission { get; set; } 

        /// <summary>A monotonically increasing version number for the file. This reflects every change made to the file
        /// on the server, even those not visible to the requesting user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("version")]
        public virtual System.Nullable<long> Version { get; set; } 

        /// <summary>Metadata about video media. This will only be present for video types.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("videoMediaMetadata")]
        public virtual File.VideoMediaMetadataData VideoMediaMetadata { get; set; } 

        /// <summary>A link for downloading the content of the file in a browser using cookie based authentication. In
        /// cases where the content is shared publicly, the content can be downloaded without any credentials.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("webContentLink")]
        public virtual string WebContentLink { get; set; } 

        /// <summary>A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc)
        /// via Google Drive's Website Hosting.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("webViewLink")]
        public virtual string WebViewLink { get; set; } 

        /// <summary>Whether writers can share the document with other users. Not populated for Team Drive
        /// files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("writersCanShare")]
        public virtual System.Nullable<bool> WritersCanShare { get; set; } 

        

        /// <summary>Capabilities the current user has on the file. Each capability corresponds to a fine-grained action
        /// that a user may take.</summary>
        public class CapabilitiesData
        {
            /// <summary>Whether the current user can add children to this folder. This is always false when the item is
            /// not a folder.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canAddChildren")]
            public virtual System.Nullable<bool> CanAddChildren { get; set; } 

            /// <summary>Whether the current user can comment on the file.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canComment")]
            public virtual System.Nullable<bool> CanComment { get; set; } 

            /// <summary>Whether the file can be copied by the current user. For a Team Drive item, whether non-folder
            /// descendants of this item, or this item itself if it is not a folder, can be copied.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canCopy")]
            public virtual System.Nullable<bool> CanCopy { get; set; } 

            /// <summary>Whether the file can be deleted by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canDelete")]
            public virtual System.Nullable<bool> CanDelete { get; set; } 

            /// <summary>Whether the file can be downloaded by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canDownload")]
            public virtual System.Nullable<bool> CanDownload { get; set; } 

            /// <summary>Whether the file can be edited by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canEdit")]
            public virtual System.Nullable<bool> CanEdit { get; set; } 

            /// <summary>Whether the current user can list the children of this folder. This is always false when the
            /// item is not a folder.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canListChildren")]
            public virtual System.Nullable<bool> CanListChildren { get; set; } 

            /// <summary>Whether the current user can move this item into a Team Drive. If the item is in a Team Drive,
            /// this field is equivalent to canMoveTeamDriveItem.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canMoveItemIntoTeamDrive")]
            public virtual System.Nullable<bool> CanMoveItemIntoTeamDrive { get; set; } 

            /// <summary>Whether the current user can move this Team Drive item by changing its parent. Note that a
            /// request to change the parent for this item may still fail depending on the new parent that is being
            /// added. Only populated for Team Drive files.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canMoveTeamDriveItem")]
            public virtual System.Nullable<bool> CanMoveTeamDriveItem { get; set; } 

            /// <summary>Whether the current user has read access to the Revisions resource of the file. For a Team
            /// Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a
            /// folder, can be read.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canReadRevisions")]
            public virtual System.Nullable<bool> CanReadRevisions { get; set; } 

            /// <summary>Whether the current user has read access to the Team Drive to which this file belongs. Only
            /// populated for Team Drive files.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canReadTeamDrive")]
            public virtual System.Nullable<bool> CanReadTeamDrive { get; set; } 

            /// <summary>Whether the current user can remove children from this folder. This is always false when the
            /// item is not a folder.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canRemoveChildren")]
            public virtual System.Nullable<bool> CanRemoveChildren { get; set; } 

            /// <summary>Whether the file can be renamed by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canRename")]
            public virtual System.Nullable<bool> CanRename { get; set; } 

            /// <summary>Whether the file's sharing settings can be modified by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canShare")]
            public virtual System.Nullable<bool> CanShare { get; set; } 

            /// <summary>Whether the file can be trashed by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canTrash")]
            public virtual System.Nullable<bool> CanTrash { get; set; } 

            /// <summary>Whether the file can be restored from the trash by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canUntrash")]
            public virtual System.Nullable<bool> CanUntrash { get; set; } 

        }    

        /// <summary>Metadata about image media. This will only be present for image types, and its contents will depend
        /// on what can be parsed from the image content.</summary>
        public class ImageMediaMetadataData
        {
            /// <summary>The aperture used to create the photo (f-number).</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("aperture")]
            public virtual System.Nullable<float> Aperture { get; set; } 

            /// <summary>The make of the camera used to create the photo.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("cameraMake")]
            public virtual string CameraMake { get; set; } 

            /// <summary>The model of the camera used to create the photo.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("cameraModel")]
            public virtual string CameraModel { get; set; } 

            /// <summary>The color space of the photo.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("colorSpace")]
            public virtual string ColorSpace { get; set; } 

            /// <summary>The date and time the photo was taken (EXIF format timestamp).</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("date")]
            public virtual string Date { get; set; } 

            /// <summary>The exposure bias of the photo (APEX value).</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("exposureBias")]
            public virtual System.Nullable<float> ExposureBias { get; set; } 

            /// <summary>The exposure mode used to create the photo.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("exposureMode")]
            public virtual string ExposureMode { get; set; } 

            /// <summary>The length of the exposure, in seconds.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("exposureTime")]
            public virtual System.Nullable<float> ExposureTime { get; set; } 

            /// <summary>Whether a flash was used to create the photo.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("flashUsed")]
            public virtual System.Nullable<bool> FlashUsed { get; set; } 

            /// <summary>The focal length used to create the photo, in millimeters.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("focalLength")]
            public virtual System.Nullable<float> FocalLength { get; set; } 

            /// <summary>The height of the image in pixels.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("height")]
            public virtual System.Nullable<int> Height { get; set; } 

            /// <summary>The ISO speed used to create the photo.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("isoSpeed")]
            public virtual System.Nullable<int> IsoSpeed { get; set; } 

            /// <summary>The lens used to create the photo.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("lens")]
            public virtual string Lens { get; set; } 

            /// <summary>Geographic location information stored in the image.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("location")]
            public virtual ImageMediaMetadataData.LocationData Location { get; set; } 

            /// <summary>The smallest f-number of the lens at the focal length used to create the photo (APEX
            /// value).</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("maxApertureValue")]
            public virtual System.Nullable<float> MaxApertureValue { get; set; } 

            /// <summary>The metering mode used to create the photo.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("meteringMode")]
            public virtual string MeteringMode { get; set; } 

            /// <summary>The rotation in clockwise degrees from the image's original orientation.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("rotation")]
            public virtual System.Nullable<int> Rotation { get; set; } 

            /// <summary>The type of sensor used to create the photo.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("sensor")]
            public virtual string Sensor { get; set; } 

            /// <summary>The distance to the subject of the photo, in meters.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("subjectDistance")]
            public virtual System.Nullable<int> SubjectDistance { get; set; } 

            /// <summary>The white balance mode used to create the photo.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("whiteBalance")]
            public virtual string WhiteBalance { get; set; } 

            /// <summary>The width of the image in pixels.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("width")]
            public virtual System.Nullable<int> Width { get; set; } 

            

            /// <summary>Geographic location information stored in the image.</summary>
            public class LocationData
            {
                /// <summary>The altitude stored in the image.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("altitude")]
                public virtual System.Nullable<double> Altitude { get; set; } 

                /// <summary>The latitude stored in the image.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("latitude")]
                public virtual System.Nullable<double> Latitude { get; set; } 

                /// <summary>The longitude stored in the image.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("longitude")]
                public virtual System.Nullable<double> Longitude { get; set; } 

            }
        }    

        /// <summary>Indexable text attributes for the file (can only be written)</summary>
        public class IndexableTextData
        {
            /// <summary>The text to be indexed for this file.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("text")]
            public virtual string Text { get; set; } 

        }    

        /// <summary>A group of labels for the file.</summary>
        public class LabelsData
        {
            /// <summary>Deprecated.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("hidden")]
            public virtual System.Nullable<bool> Hidden { get; set; } 

            /// <summary>Whether the file has been modified by this user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("modified")]
            public virtual System.Nullable<bool> Modified { get; set; } 

            /// <summary>Whether viewers and commenters are prevented from downloading, printing, and copying this
            /// file.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("restricted")]
            public virtual System.Nullable<bool> Restricted { get; set; } 

            /// <summary>Whether this file is starred by the user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("starred")]
            public virtual System.Nullable<bool> Starred { get; set; } 

            /// <summary>Whether this file has been trashed. This label applies to all users accessing the file;
            /// however, only owners are allowed to see and untrash files.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("trashed")]
            public virtual System.Nullable<bool> Trashed { get; set; } 

            /// <summary>Whether this file has been viewed by this user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("viewed")]
            public virtual System.Nullable<bool> Viewed { get; set; } 

        }    

        /// <summary>A thumbnail for the file. This will only be used if Drive cannot generate a standard
        /// thumbnail.</summary>
        public class ThumbnailData
        {
            /// <summary>The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section
            /// 5.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("image")]
            public virtual string Image { get; set; } 

            /// <summary>The MIME type of the thumbnail.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("mimeType")]
            public virtual string MimeType { get; set; } 

        }    

        /// <summary>Metadata about video media. This will only be present for video types.</summary>
        public class VideoMediaMetadataData
        {
            /// <summary>The duration of the video in milliseconds.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("durationMillis")]
            public virtual System.Nullable<long> DurationMillis { get; set; } 

            /// <summary>The height of the video in pixels.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("height")]
            public virtual System.Nullable<int> Height { get; set; } 

            /// <summary>The width of the video in pixels.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("width")]
            public virtual System.Nullable<int> Width { get; set; } 

        }
    }    

    /// <summary>A list of files.</summary>
    public class FileList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Whether the search process was incomplete. If true, then some search results may be missing, since
        /// all documents were not searched. This may occur when searching multiple Team Drives with the
        /// "default,allTeamDrives" corpora, but all corpora could not be searched. When this happens, it is suggested
        /// that clients narrow their query by choosing a different corpus such as "default" or "teamDrive".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("incompleteSearch")]
        public virtual System.Nullable<bool> IncompleteSearch { get; set; } 

        /// <summary>The list of files. If nextPageToken is populated, then this list may be incomplete and an
        /// additional page of results should be fetched.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<File> Items { get; set; } 

        /// <summary>This is always drive#fileList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A link to the next page of files.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextLink")]
        public virtual string NextLink { get; set; } 

        /// <summary>The page token for the next page of files. This will be absent if the end of the files list has
        /// been reached. If the token is rejected for any reason, it should be discarded, and pagination should be
        /// restarted from the first page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>A link back to this list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

    }    

    /// <summary>A list of generated IDs which can be provided in insert requests</summary>
    public class GeneratedIds : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The IDs generated for the requesting user in the specified space.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ids")]
        public virtual System.Collections.Generic.IList<string> Ids { get; set; } 

        /// <summary>This is always drive#generatedIds</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The type of file that can be created with these IDs.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("space")]
        public virtual string Space { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A list of a file's parents.</summary>
    public class ParentList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The list of parents.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<ParentReference> Items { get; set; } 

        /// <summary>This is always drive#parentList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A link back to this list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

    }    

    /// <summary>A reference to a file's parent.</summary>
    public class ParentReference : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ID of the parent.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Whether or not the parent is the root folder.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isRoot")]
        public virtual System.Nullable<bool> IsRoot { get; set; } 

        /// <summary>This is always drive#parentReference.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>A link to the parent.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("parentLink")]
        public virtual string ParentLink { get; set; } 

        /// <summary>A link back to this reference.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A permission for a file.</summary>
    public class Permission : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Additional roles for this user. Only commenter is currently allowed, though more may be supported
        /// in the future.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("additionalRoles")]
        public virtual System.Collections.Generic.IList<string> AdditionalRoles { get; set; } 

        /// <summary>The authkey parameter required for this permission.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("authKey")]
        public virtual string AuthKey { get; set; } 

        /// <summary>The domain name of the entity this permission refers to. This is an output-only field which is
        /// present when the permission type is user, group or domain.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domain")]
        public virtual string Domain { get; set; } 

        /// <summary>The email address of the user or group this permission refers to. This is an output-only field
        /// which is present when the permission type is user or group.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("emailAddress")]
        public virtual string EmailAddress { get; set; } 

        /// <summary>The ETag of the permission.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the
        /// following restrictions: - They can only be set on user and group permissions - The date must be in the
        /// future - The date cannot be more than a year in the future - The date can only be set on
        /// drive.permissions.update requests</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("expirationDate")]
        public virtual string ExpirationDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="ExpirationDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> ExpirationDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(ExpirationDateRaw);
            }
            set
            {
                ExpirationDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The ID of the user this permission refers to, and identical to the permissionId in the About and
        /// Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must
        /// be specified unless the permission type is anyone, in which case both id and value are ignored.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>This is always drive#permission.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The name for this permission.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>A link to the profile photo, if available.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("photoLink")]
        public virtual string PhotoLink { get; set; } 

        /// <summary>The primary role for this user. While new values may be supported in the future, the following are
        /// currently allowed: - organizer - owner - reader - writer</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("role")]
        public virtual string Role { get; set; } 

        /// <summary>A link back to this permission.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>Details of whether the Permissions on this Team Drive item are inherited or directly on this item.
        /// This is an output-only field which is present only for Team Drive items.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("teamDrivePermissionDetails")]
        public virtual System.Collections.Generic.IList<Permission.TeamDrivePermissionDetailsData> TeamDrivePermissionDetails { get; set; } 

        /// <summary>The account type. Allowed values are: - user - group - domain - anyone</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The email address or domain name for the entity. This is used during inserts and is not populated
        /// in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be
        /// specified unless the permission type is anyone, in which case both id and value are ignored.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>Whether the link is required for this permission.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("withLink")]
        public virtual System.Nullable<bool> WithLink { get; set; } 

        

        public class TeamDrivePermissionDetailsData
        {
            /// <summary>Additional roles for this user. Only commenter is currently possible, though more may be
            /// supported in the future.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("additionalRoles")]
            public virtual System.Collections.Generic.IList<string> AdditionalRoles { get; set; } 

            /// <summary>Whether this permission is inherited. This field is always populated. This is an output-only
            /// field.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("inherited")]
            public virtual System.Nullable<bool> Inherited { get; set; } 

            /// <summary>The ID of the item from which this permission is inherited. This is an output-only field and is
            /// only populated for members of the Team Drive.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("inheritedFrom")]
            public virtual string InheritedFrom { get; set; } 

            /// <summary>The primary role for this user. While new values may be added in the future, the following are
            /// currently possible: - organizer - reader - writer</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("role")]
            public virtual string Role { get; set; } 

            /// <summary>The Team Drive permission type for this user. While new values may be added in future, the
            /// following are currently possible: - file - member</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("teamDrivePermissionType")]
            public virtual string TeamDrivePermissionType { get; set; } 

        }
    }    

    /// <summary>An ID for a user or group as seen in Permission items.</summary>
    public class PermissionId : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The permission ID.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>This is always drive#permissionId.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A list of permissions associated with a file.</summary>
    public class PermissionList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The list of permissions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Permission> Items { get; set; } 

        /// <summary>This is always drive#permissionList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The page token for the next page of permissions. This field will be absent if the end of the
        /// permissions list has been reached. If the token is rejected for any reason, it should be discarded, and
        /// pagination should be restarted from the first page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>A link back to this list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

    }    

    /// <summary>A key-value pair attached to a file that is either public or private to an application. The following
    /// limits apply to file properties: - Maximum of 100 properties total per file - Maximum of 30 private properties
    /// per app - Maximum of 30 public properties - Maximum of 124 bytes size limit on (key + value) string in UTF-8
    /// encoding for a single property.</summary>
    public class Property : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of the property.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The key of this property.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("key")]
        public virtual string Key { get; set; } 

        /// <summary>This is always drive#property.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The link back to this property.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The value of this property.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The visibility of this property.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("visibility")]
        public virtual string Visibility { get; set; } 

    }    

    /// <summary>A collection of properties, key-value pairs that are either public or private to an
    /// application.</summary>
    public class PropertyList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The list of properties.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Property> Items { get; set; } 

        /// <summary>This is always drive#propertyList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The link back to this list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

    }    

    /// <summary>A revision of a file.</summary>
    public class Revision : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Short term download URL for the file. This will only be populated on files with content stored in
        /// Drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("downloadUrl")]
        public virtual string DownloadUrl { get; set; } 

        /// <summary>The ETag of the revision.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>Links for exporting Google Docs to specific formats.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("exportLinks")]
        public virtual System.Collections.Generic.IDictionary<string,string> ExportLinks { get; set; } 

        /// <summary>The size of the revision in bytes. This will only be populated on files with content stored in
        /// Drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fileSize")]
        public virtual System.Nullable<long> FileSize { get; set; } 

        /// <summary>The ID of the revision.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>This is always drive#revision.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The last user to modify this revision.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastModifyingUser")]
        public virtual User LastModifyingUser { get; set; } 

        /// <summary>Name of the last user to modify this revision.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastModifyingUserName")]
        public virtual string LastModifyingUserName { get; set; } 

        /// <summary>An MD5 checksum for the content of this revision. This will only be populated on files with content
        /// stored in Drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("md5Checksum")]
        public virtual string Md5Checksum { get; set; } 

        /// <summary>The MIME type of the revision.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mimeType")]
        public virtual string MimeType { get; set; } 

        /// <summary>Last time this revision was modified (formatted RFC 3339 timestamp).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("modifiedDate")]
        public virtual string ModifiedDateRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="ModifiedDateRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> ModifiedDate
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(ModifiedDateRaw);
            }
            set
            {
                ModifiedDateRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The original filename when this revision was created. This will only be populated on files with
        /// content stored in Drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("originalFilename")]
        public virtual string OriginalFilename { get; set; } 

        /// <summary>Whether this revision is pinned to prevent automatic purging. This will only be populated and can
        /// only be modified on files with content stored in Drive which are not Google Docs. Revisions can also be
        /// pinned when they are created through the drive.files.insert/update/copy by using the pinned query
        /// parameter.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("pinned")]
        public virtual System.Nullable<bool> Pinned { get; set; } 

        /// <summary>Whether subsequent revisions will be automatically republished. This is only populated and can only
        /// be modified for Google Docs.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("publishAuto")]
        public virtual System.Nullable<bool> PublishAuto { get; set; } 

        /// <summary>Whether this revision is published. This is only populated and can only be modified for Google
        /// Docs.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("published")]
        public virtual System.Nullable<bool> Published { get; set; } 

        /// <summary>A link to the published revision.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("publishedLink")]
        public virtual string PublishedLink { get; set; } 

        /// <summary>Whether this revision is published outside the domain. This is only populated and can only be
        /// modified for Google Docs.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("publishedOutsideDomain")]
        public virtual System.Nullable<bool> PublishedOutsideDomain { get; set; } 

        /// <summary>A link back to this revision.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

    }    

    /// <summary>A list of revisions of a file.</summary>
    public class RevisionList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The list of revisions. If nextPageToken is populated, then this list may be incomplete and an
        /// additional page of results should be fetched.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Revision> Items { get; set; } 

        /// <summary>This is always drive#revisionList.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The page token for the next page of revisions. This field will be absent if the end of the
        /// revisions list has been reached. If the token is rejected for any reason, it should be discarded and
        /// pagination should be restarted from the first page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>A link back to this list.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

    }    

    public class StartPageToken : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identifies what kind of resource this is. Value: the fixed string "drive#startPageToken".</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The starting page token for listing changes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("startPageToken")]
        public virtual string StartPageTokenValue { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Representation of a Team Drive.</summary>
    public class TeamDrive : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Capabilities the current user has on this Team Drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("capabilities")]
        public virtual TeamDrive.CapabilitiesData Capabilities { get; set; } 

        /// <summary>The ID of this Team Drive which is also the ID of the top level folder for this Team
        /// Drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>This is always drive#teamDrive</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The name of this Team Drive.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>Capabilities the current user has on this Team Drive.</summary>
        public class CapabilitiesData
        {
            /// <summary>Whether the current user can add children to folders in this Team Drive.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canAddChildren")]
            public virtual System.Nullable<bool> CanAddChildren { get; set; } 

            /// <summary>Whether the current user can comment on files in this Team Drive.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canComment")]
            public virtual System.Nullable<bool> CanComment { get; set; } 

            /// <summary>Whether files in this Team Drive can be copied by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canCopy")]
            public virtual System.Nullable<bool> CanCopy { get; set; } 

            /// <summary>Whether this Team Drive can be deleted by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canDeleteTeamDrive")]
            public virtual System.Nullable<bool> CanDeleteTeamDrive { get; set; } 

            /// <summary>Whether files in this Team Drive can be downloaded by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canDownload")]
            public virtual System.Nullable<bool> CanDownload { get; set; } 

            /// <summary>Whether files in this Team Drive can be edited by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canEdit")]
            public virtual System.Nullable<bool> CanEdit { get; set; } 

            /// <summary>Whether the current user can list the children of folders in this Team Drive.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canListChildren")]
            public virtual System.Nullable<bool> CanListChildren { get; set; } 

            /// <summary>Whether the current user can add members to this Team Drive or remove them or change their
            /// role.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canManageMembers")]
            public virtual System.Nullable<bool> CanManageMembers { get; set; } 

            /// <summary>Whether the current user has read access to the Revisions resource of files in this Team
            /// Drive.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canReadRevisions")]
            public virtual System.Nullable<bool> CanReadRevisions { get; set; } 

            /// <summary>Whether the current user can remove children from folders in this Team Drive.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canRemoveChildren")]
            public virtual System.Nullable<bool> CanRemoveChildren { get; set; } 

            /// <summary>Whether files or folders in this Team Drive can be renamed by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canRename")]
            public virtual System.Nullable<bool> CanRename { get; set; } 

            /// <summary>Whether this Team Drive can be renamed by the current user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canRenameTeamDrive")]
            public virtual System.Nullable<bool> CanRenameTeamDrive { get; set; } 

            /// <summary>Whether the current user can share files or folders in this Team Drive.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("canShare")]
            public virtual System.Nullable<bool> CanShare { get; set; } 

        }
    }    

    /// <summary>A list of Team Drives.</summary>
    public class TeamDriveList : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of Team Drives.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<TeamDrive> Items { get; set; } 

        /// <summary>This is always drive#teamDriveList</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The page token for the next page of Team Drives.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Information about a Drive user.</summary>
    public class User : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A plain text displayable name for this user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("displayName")]
        public virtual string DisplayName { get; set; } 

        /// <summary>The email address of the user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("emailAddress")]
        public virtual string EmailAddress { get; set; } 

        /// <summary>Whether this user is the same as the authenticated user for whom the request was made.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isAuthenticatedUser")]
        public virtual System.Nullable<bool> IsAuthenticatedUser { get; set; } 

        /// <summary>This is always drive#user.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The user's ID as visible in the permissions collection.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("permissionId")]
        public virtual string PermissionId { get; set; } 

        /// <summary>The user's profile picture.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("picture")]
        public virtual User.PictureData Picture { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>The user's profile picture.</summary>
        public class PictureData
        {
            /// <summary>A URL that points to a profile picture of this user.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("url")]
            public virtual string Url { get; set; } 

        }
    }
}
